<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-8"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns #-}</span><span>
</span><span id="line-9"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Rename.HsType</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>        </span><span class="hs-comment">-- Type related stuff</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsType"><span class="hs-identifier">rnHsType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier">rnLHsType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypes"><span class="hs-identifier">rnLHsTypes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnContext"><span class="hs-identifier">rnContext</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsKind"><span class="hs-identifier">rnHsKind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsKind"><span class="hs-identifier">rnLHsKind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypeArgs"><span class="hs-identifier">rnLHsTypeArgs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsSigType"><span class="hs-identifier">rnHsSigType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsWcType"><span class="hs-identifier">rnHsWcType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#HsSigWcTypeScoping"><span class="hs-identifier">HsSigWcTypeScoping</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsSigWcType"><span class="hs-identifier">rnHsSigWcType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsPatSigType"><span class="hs-identifier">rnHsPatSigType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier">newTyVarNameRn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnConDeclFields"><span class="hs-identifier">rnConDeclFields</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnLTyVar"><span class="hs-identifier">rnLTyVar</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnScaledLHsType"><span class="hs-identifier">rnScaledLHsType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>        </span><span class="hs-comment">-- Precence related stuff</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#NegationHandling"><span class="hs-identifier">NegationHandling</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier">mkOpAppRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#mkNegAppRn"><span class="hs-identifier">mkNegAppRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpFormRn"><span class="hs-identifier">mkOpFormRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier">mkConOpPatRn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#checkPrecMatch"><span class="hs-identifier">checkPrecMatch</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#checkSectionPrec"><span class="hs-identifier">checkSectionPrec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="hs-comment">-- Binding related stuff</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#bindHsForAllTelescope"><span class="hs-identifier">bindHsForAllTelescope</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#bindLHsTyVarBndr"><span class="hs-identifier">bindLHsTyVarBndr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier">bindLHsTyVarBndrs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier">WarnUnusedForalls</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier">rnImplicitBndrs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#bindSigTyVarsFV"><span class="hs-identifier">bindSigTyVarsFV</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#bindHsQTyVars"><span class="hs-identifier">bindHsQTyVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier">FreeKiTyVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier">extractHsTyRdrTyVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVarsKindVars"><span class="hs-identifier">extractHsTyRdrTyVarsKindVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTysRdrTyVars"><span class="hs-identifier">extractHsTysRdrTyVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#extractRdrKindSigVars"><span class="hs-identifier">extractRdrKindSigVars</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#extractDataDefnKindVars"><span class="hs-identifier">extractDataDefnKindVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTvBndrs"><span class="hs-identifier">extractHsTvBndrs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyArgRdrKiTyVars"><span class="hs-identifier">extractHsTyArgRdrKiTyVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsScaledTysRdrTyVars"><span class="hs-identifier">extractHsScaledTysRdrTyVars</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.Rename.HsType.html#forAllOrNothing"><span class="hs-identifier">forAllOrNothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier">nubL</span></a></span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-pragma">{-# SOURCE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="annot"><a href="GHC.Rename.Splice.html"><span class="hs-identifier">GHC.Rename.Splice</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Splice.html#rnSpliceType"><span class="hs-identifier">rnSpliceType</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Doc.html"><span class="hs-identifier">GHC.Rename.Doc</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Doc.html#rnLHsDoc"><span class="hs-identifier">rnLHsDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Doc.html#rnMbLHsDoc"><span class="hs-identifier">rnMbLHsDoc</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Env.html"><span class="hs-identifier">GHC.Rename.Env</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html"><span class="hs-identifier">GHC.Rename.Utils</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier">HsDocContext</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#inHsDocContext"><span class="hs-identifier">inHsDocContext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#withHsDocContext"><span class="hs-identifier">withHsDocContext</span></a></span><span>
</span><span id="line-49"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier">mapFvRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#pprHsDocContext"><span class="hs-identifier">pprHsDocContext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier">bindLocalNamesFV</span></a></span><span>
</span><span id="line-50"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#typeAppErr"><span class="hs-identifier">typeAppErr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier">newLocalBndrRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkDupRdrNames"><span class="hs-identifier">checkDupRdrNames</span></a></span><span>
</span><span id="line-51"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#checkShadowedRdrNames"><span class="hs-identifier">checkShadowedRdrNames</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html"><span class="hs-identifier">GHC.Rename.Fixity</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html#lookupFieldFixityRn"><span class="hs-identifier">lookupFieldFixityRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier">lookupFixityRn</span></a></span><span>
</span><span id="line-53"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.Fixity.html#lookupTyFixityRn"><span class="hs-identifier">lookupTyFixityRn</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html#funTyConName"><span class="hs-identifier">funTyConName</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html"><span class="hs-identifier">GHC.Types.FieldLabel</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier">compareFixity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#funTyFixity"><span class="hs-identifier">funTyFixity</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier">negateFixity</span></a></span><span>
</span><span id="line-65"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier">Fixity</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#FixityDirection"><span class="hs-identifier">FixityDirection</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#LexicalFixity"><span class="hs-identifier">LexicalFixity</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TypeOrKind"><span class="hs-identifier">TypeOrKind</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>          </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#nubBy"><span class="hs-identifier">nubBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#partition"><span class="hs-identifier">partition</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier">unless</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier">when</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-77"></span><span class="hs-comment">{-
These type renamers are in a separate module, rather than in (say) GHC.Rename.Module,
to break several loops.

*********************************************************
*                                                       *
    HsSigWcType and HsPatSigType (i.e with wildcards)
*                                                       *
*********************************************************
-}</span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-keyword">data</span><span> </span><span id="HsSigWcTypeScoping"><span class="annot"><a href="GHC.Rename.HsType.html#HsSigWcTypeScoping"><span class="hs-identifier hs-var">HsSigWcTypeScoping</span></a></span></span><span>
</span><span id="line-89"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="AlwaysBind"><span class="annot"><a href="GHC.Rename.HsType.html#AlwaysBind"><span class="hs-identifier hs-var">AlwaysBind</span></a></span></span><span>
</span><span id="line-90"></span><span>    </span><span class="hs-comment">-- ^ Always bind any free tyvars of the given type, regardless of whether we</span><span>
</span><span id="line-91"></span><span>    </span><span class="hs-comment">-- have a forall at the top.</span><span>
</span><span id="line-92"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-93"></span><span>    </span><span class="hs-comment">-- For pattern type sigs, we /do/ want to bring those type</span><span>
</span><span id="line-94"></span><span>    </span><span class="hs-comment">-- variables into scope, even if there's a forall at the top which usually</span><span>
</span><span id="line-95"></span><span>    </span><span class="hs-comment">-- stops that happening, e.g:</span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-97"></span><span>    </span><span class="hs-comment">-- &gt; \ (x :: forall a. a -&gt; b) -&gt; e</span><span>
</span><span id="line-98"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-99"></span><span>    </span><span class="hs-comment">-- Here we do bring 'b' into scope.</span><span>
</span><span id="line-100"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-101"></span><span>    </span><span class="hs-comment">-- RULES can also use 'AlwaysBind', such as in the following example:</span><span>
</span><span id="line-102"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-comment">-- &gt; {-# RULES \&quot;f\&quot; forall (x :: forall a. a -&gt; b). f x = ... b ... #-}</span><span>
</span><span id="line-104"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-105"></span><span>    </span><span class="hs-comment">-- This only applies to RULES that do not explicitly bind their type</span><span>
</span><span id="line-106"></span><span>    </span><span class="hs-comment">-- variables. If a RULE explicitly quantifies its type variables, then</span><span>
</span><span id="line-107"></span><span>    </span><span class="hs-comment">-- 'NeverBind' is used instead. See also</span><span>
</span><span id="line-108"></span><span>    </span><span class="hs-comment">-- @Note [Pattern signature binders and scoping]@ in &quot;GHC.Hs.Type&quot;.</span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="BindUnlessForall"><span class="annot"><a href="GHC.Rename.HsType.html#BindUnlessForall"><span class="hs-identifier hs-var">BindUnlessForall</span></a></span></span><span>
</span><span id="line-110"></span><span>    </span><span class="hs-comment">-- ^ Unless there's forall at the top, do the same thing as 'AlwaysBind'.</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-comment">-- This is only ever used in places where the \&quot;@forall@-or-nothing\&quot; rule</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-comment">-- is in effect. See @Note [forall-or-nothing rule]@.</span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NeverBind"><span class="annot"><a href="GHC.Rename.HsType.html#NeverBind"><span class="hs-identifier hs-var">NeverBind</span></a></span></span><span>
</span><span id="line-114"></span><span>    </span><span class="hs-comment">-- ^ Never bind any free tyvars. This is used for RULES that have both</span><span>
</span><span id="line-115"></span><span>    </span><span class="hs-comment">-- explicit type and term variable binders, e.g.:</span><span>
</span><span id="line-116"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-117"></span><span>    </span><span class="hs-comment">-- &gt; {-# RULES \&quot;const\&quot; forall a. forall (x :: a) y. const x y = x #-}</span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-comment">-- The presence of the type variable binder @forall a.@ implies that the</span><span>
</span><span id="line-120"></span><span>    </span><span class="hs-comment">-- free variables in the types of the term variable binders @x@ and @y@</span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-comment">-- are /not/ bound. In the example above, there are no such free variables,</span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-comment">-- but if the user had written @(y :: b)@ instead of @y@ in the term</span><span>
</span><span id="line-123"></span><span>    </span><span class="hs-comment">-- variable binders, then @b@ would be rejected for being out of scope.</span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-comment">-- See also @Note [Pattern signature binders and scoping]@ in</span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-comment">-- &quot;GHC.Hs.Type&quot;.</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsSigWcType"><span class="hs-identifier hs-type">rnHsSigWcType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-128"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsSigWcType"><span class="hs-identifier hs-type">LHsSigWcType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-129"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsSigWcType"><span class="hs-identifier hs-type">LHsSigWcType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span id="rnHsSigWcType"><span class="annot"><span class="annottext">rnHsSigWcType :: HsDocContext
-&gt; LHsSigWcType GhcPs -&gt; RnM (LHsSigWcType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsSigWcType"><span class="hs-identifier hs-var hs-var">rnHsSigWcType</span></a></span></span><span> </span><span id="local-6989586621681130046"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681130046"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsWC"><span class="hs-identifier hs-type">HsWC</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hswc_body :: forall pass thing. HsWildCardBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hswc_body"><span class="hs-identifier hs-var">hswc_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681130041"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681130041"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; LHsType GhcPs
-&gt; ([Name]
    -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (LHsSigWcType GhcRn, FreeVars))
-&gt; RnM (LHsSigWcType GhcRn, FreeVars)
forall a.
HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; LHsType GhcPs
-&gt; ([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rn_hs_sig_wc_type"><span class="hs-identifier hs-var">rn_hs_sig_wc_type</span></a></span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="GHC.Rename.HsType.html#BindUnlessForall"><span class="hs-identifier hs-var">BindUnlessForall</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681130046"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681130041"><span class="hs-identifier hs-var">hs_ty</span></a></span><span> </span><span class="annot"><span class="annottext">(([Name]
  -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (LHsSigWcType GhcRn, FreeVars))
 -&gt; RnM (LHsSigWcType GhcRn, FreeVars))
-&gt; ([Name]
    -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (LHsSigWcType GhcRn, FreeVars))
-&gt; RnM (LHsSigWcType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681130039"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130039"><span class="hs-identifier hs-var">nwcs</span></a></span></span><span> </span><span id="local-6989586621681130038"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130038"><span class="hs-identifier hs-var">imp_tvs</span></a></span></span><span> </span><span id="local-6989586621681130037"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681130037"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-132"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681130036"><span class="annot"><span class="annottext">ib_ty :: HsImplicitBndrs GhcRn (LHsType GhcRn)
</span><a href="#local-6989586621681130036"><span class="hs-identifier hs-var hs-var">ib_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsIB :: forall pass thing.
XHsIB pass thing -&gt; thing -&gt; HsImplicitBndrs pass thing
</span><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_ext :: XHsIB GhcRn (LHsType GhcRn)
</span><a href="GHC.Hs.Type.html#hsib_ext"><span class="hs-identifier hs-var">hsib_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
XHsIB GhcRn (LHsType GhcRn)
</span><a href="#local-6989586621681130038"><span class="hs-identifier hs-var">imp_tvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsib_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681130037"><span class="hs-identifier hs-var">body</span></a></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-133"></span><span>        </span><span id="local-6989586621681130034"><span class="annot"><span class="annottext">wc_ty :: LHsSigWcType GhcRn
</span><a href="#local-6989586621681130034"><span class="hs-identifier hs-var hs-var">wc_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsWC :: forall pass thing.
XHsWC pass thing -&gt; thing -&gt; HsWildCardBndrs pass thing
</span><a href="GHC.Hs.Type.html#HsWC"><span class="hs-identifier hs-type">HsWC</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hswc_ext :: XHsWC GhcRn (HsImplicitBndrs GhcRn (LHsType GhcRn))
</span><a href="GHC.Hs.Type.html#hswc_ext"><span class="hs-identifier hs-var">hswc_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
XHsWC GhcRn (HsImplicitBndrs GhcRn (LHsType GhcRn))
</span><a href="#local-6989586621681130039"><span class="hs-identifier hs-var">nwcs</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><span class="annottext">hswc_body :: HsImplicitBndrs GhcRn (LHsType GhcRn)
</span><a href="GHC.Hs.Type.html#hswc_body"><span class="hs-identifier hs-var">hswc_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsImplicitBndrs GhcRn (LHsType GhcRn)
</span><a href="#local-6989586621681130036"><span class="hs-identifier hs-var">ib_ty</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">(LHsSigWcType GhcRn, FreeVars)
-&gt; RnM (LHsSigWcType GhcRn, FreeVars)
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsSigWcType GhcRn
</span><a href="#local-6989586621681130034"><span class="hs-identifier hs-var">wc_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span id="local-6989586621681130675"><span class="annot"><a href="GHC.Rename.HsType.html#rnHsPatSigType"><span class="hs-identifier hs-type">rnHsPatSigType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#HsSigWcTypeScoping"><span class="hs-identifier hs-type">HsSigWcTypeScoping</span></a></span><span>
</span><span id="line-137"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-138"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-139"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130675"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130675"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-141"></span><span class="hs-comment">-- Used for</span><span>
</span><span id="line-142"></span><span class="hs-comment">--   - Pattern type signatures, which are only allowed with ScopedTypeVariables</span><span>
</span><span id="line-143"></span><span class="hs-comment">--   - Signatures on binders in a RULE, which are allowed even if</span><span>
</span><span id="line-144"></span><span class="hs-comment">--     ScopedTypeVariables isn't enabled</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- Wildcards are allowed</span><span>
</span><span id="line-146"></span><span class="hs-comment">--</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- See Note [Pattern signature binders and scoping] in GHC.Hs.Type</span><span>
</span><span id="line-148"></span><span id="rnHsPatSigType"><span class="annot"><span class="annottext">rnHsPatSigType :: forall a.
HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; HsPatSigType GhcPs
-&gt; (HsPatSigType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsPatSigType"><span class="hs-identifier hs-var hs-var">rnHsPatSigType</span></a></span></span><span> </span><span id="local-6989586621681130029"><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="#local-6989586621681130029"><span class="hs-identifier hs-var">scoping</span></a></span></span><span> </span><span id="local-6989586621681130028"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681130028"><span class="hs-identifier hs-var">ctx</span></a></span></span><span> </span><span id="local-6989586621681130027"><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681130027"><span class="hs-identifier hs-var">sig_ty</span></a></span></span><span> </span><span id="local-6989586621681130026"><span class="annot"><span class="annottext">HsPatSigType GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681130026"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-149"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681130025"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681130025"><span class="hs-identifier hs-var">ty_sig_okay</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#ScopedTypeVariables"><span class="hs-identifier hs-var">LangExt.ScopedTypeVariables</span></a></span><span>
</span><span id="line-150"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#checkErr"><span class="hs-identifier hs-var">checkErr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681130025"><span class="hs-identifier hs-var">ty_sig_okay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsPatSigType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#unexpectedPatSigTypeErr"><span class="hs-identifier hs-var">unexpectedPatSigTypeErr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681130027"><span class="hs-identifier hs-var">sig_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; LHsType GhcPs
-&gt; ([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a.
HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; LHsType GhcPs
-&gt; ([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rn_hs_sig_wc_type"><span class="hs-identifier hs-var">rn_hs_sig_wc_type</span></a></span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="#local-6989586621681130029"><span class="hs-identifier hs-var">scoping</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681130028"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsPatSigType GhcPs -&gt; LHsType GhcPs
forall pass. HsPatSigType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hsPatSigType"><span class="hs-identifier hs-var">hsPatSigType</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681130027"><span class="hs-identifier hs-var">sig_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
 -&gt; RnM (a, FreeVars))
-&gt; ([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-152"></span><span>         </span><span class="hs-glyph">\</span><span id="local-6989586621681130019"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130019"><span class="hs-identifier hs-var">nwcs</span></a></span></span><span> </span><span id="local-6989586621681130018"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130018"><span class="hs-identifier hs-var">imp_tvs</span></a></span></span><span> </span><span id="local-6989586621681130017"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681130017"><span class="hs-identifier hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-153"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681130016"><span class="annot"><span class="annottext">sig_names :: HsPSRn
</span><a href="#local-6989586621681130016"><span class="hs-identifier hs-var hs-var">sig_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsPSRn :: [Name] -&gt; [Name] -&gt; HsPSRn
</span><a href="GHC.Hs.Type.html#HsPSRn"><span class="hs-identifier hs-type">HsPSRn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsps_nwcs :: [Name]
</span><a href="GHC.Hs.Type.html#hsps_nwcs"><span class="hs-identifier hs-var">hsps_nwcs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130019"><span class="hs-identifier hs-var">nwcs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsps_imp_tvs :: [Name]
</span><a href="GHC.Hs.Type.html#hsps_imp_tvs"><span class="hs-identifier hs-var">hsps_imp_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681130018"><span class="hs-identifier hs-var">imp_tvs</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-154"></span><span>             </span><span id="local-6989586621681130012"><span class="annot"><span class="annottext">sig_ty' :: HsPatSigType GhcRn
</span><a href="#local-6989586621681130012"><span class="hs-identifier hs-var hs-var">sig_ty'</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsPS :: forall pass. XHsPS pass -&gt; LHsType pass -&gt; HsPatSigType pass
</span><a href="GHC.Hs.Type.html#HsPS"><span class="hs-identifier hs-type">HsPS</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsps_ext :: XHsPS GhcRn
</span><a href="GHC.Hs.Type.html#hsps_ext"><span class="hs-identifier hs-var">hsps_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XHsPS GhcRn
HsPSRn
</span><a href="#local-6989586621681130016"><span class="hs-identifier hs-var">sig_names</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsps_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hsps_body"><span class="hs-identifier hs-var">hsps_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681130017"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-155"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681130026"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcRn
</span><a href="#local-6989586621681130012"><span class="hs-identifier hs-var">sig_ty'</span></a></span><span>
</span><span id="line-156"></span><span>       </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- The workhorse for rnHsSigWcType and rnHsPatSigType.</span><span>
</span><span id="line-159"></span><span id="local-6989586621681130687"><span class="annot"><a href="GHC.Rename.HsType.html#rn_hs_sig_wc_type"><span class="hs-identifier hs-type">rn_hs_sig_wc_type</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#HsSigWcTypeScoping"><span class="hs-identifier hs-type">HsSigWcTypeScoping</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-160"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-161"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- Wildcard names</span><span>
</span><span id="line-162"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- Implicitly bound type variable names</span><span>
</span><span id="line-163"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-164"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130687"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130687"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-166"></span><span id="rn_hs_sig_wc_type"><span class="annot"><span class="annottext">rn_hs_sig_wc_type :: forall a.
HsSigWcTypeScoping
-&gt; HsDocContext
-&gt; LHsType GhcPs
-&gt; ([Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rn_hs_sig_wc_type"><span class="hs-identifier hs-var hs-var">rn_hs_sig_wc_type</span></a></span></span><span> </span><span id="local-6989586621681129999"><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="#local-6989586621681129999"><span class="hs-identifier hs-var">scoping</span></a></span></span><span> </span><span id="local-6989586621681129998"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129998"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129997"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129997"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span id="local-6989586621681129996"><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129996"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-167"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129995"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129995"><span class="hs-identifier hs-var">free_vars</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScopeM"><span class="hs-identifier hs-var">filterInScopeM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129997"><span class="hs-identifier hs-var">hs_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129993"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129993"><span class="hs-identifier hs-var">nwc_rdrs'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129992"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129992"><span class="hs-identifier hs-var">tv_rdrs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM (FreeKiTyVars, FreeKiTyVars)
</span><a href="GHC.Rename.HsType.html#partition_nwcs"><span class="hs-identifier hs-var">partition_nwcs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129995"><span class="hs-identifier hs-var">free_vars</span></a></span><span>
</span><span id="line-169"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129990"><span class="annot"><span class="annottext">nwc_rdrs :: FreeKiTyVars
</span><a href="#local-6989586621681129990"><span class="hs-identifier hs-var hs-var">nwc_rdrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars
forall a. Eq a =&gt; [Located a] -&gt; [Located a]
</span><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier hs-var">nubL</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129993"><span class="hs-identifier hs-var">nwc_rdrs'</span></a></span><span>
</span><span id="line-170"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129989"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129989"><span class="hs-identifier hs-var">implicit_bndrs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="#local-6989586621681129999"><span class="hs-identifier hs-var">scoping</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-171"></span><span>           </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="GHC.Rename.HsType.html#AlwaysBind"><span class="hs-identifier hs-var">AlwaysBind</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129992"><span class="hs-identifier hs-var">tv_rdrs</span></a></span><span>
</span><span id="line-172"></span><span>           </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="GHC.Rename.HsType.html#BindUnlessForall"><span class="hs-identifier hs-var">BindUnlessForall</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#forAllOrNothing"><span class="hs-identifier hs-var">forAllOrNothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; Bool
forall p. LHsType p -&gt; Bool
</span><a href="GHC.Hs.Type.html#isLHsForAllTy"><span class="hs-identifier hs-var">isLHsForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129997"><span class="hs-identifier hs-var">hs_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129992"><span class="hs-identifier hs-var">tv_rdrs</span></a></span><span>
</span><span id="line-173"></span><span>           </span><span class="annot"><span class="annottext">HsSigWcTypeScoping
</span><a href="GHC.Rename.HsType.html#NeverBind"><span class="hs-identifier hs-var">NeverBind</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-174"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe Any
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall assoc a.
Maybe assoc
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier hs-var">rnImplicitBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Any
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129989"><span class="hs-identifier hs-var">implicit_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(([Name] -&gt; RnM (a, FreeVars)) -&gt; RnM (a, FreeVars))
-&gt; ([Name] -&gt; RnM (a, FreeVars)) -&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129987"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129987"><span class="hs-identifier hs-var">vars</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129986"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129986"><span class="hs-identifier hs-var">wcs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129985"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129985"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129984"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129984"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; FreeKiTyVars
-&gt; LHsType GhcPs
-&gt; RnM ([Name], LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnWcBody"><span class="hs-identifier hs-var">rnWcBody</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129998"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129990"><span class="hs-identifier hs-var">nwc_rdrs</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129997"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-176"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129982"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129982"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129981"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129981"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Name] -&gt; LHsType GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129996"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129986"><span class="hs-identifier hs-var">wcs</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129987"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129985"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span>
</span><span id="line-177"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(a, FreeVars) -&gt; RnM (a, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129982"><span class="hs-identifier hs-var">res</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129984"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129981"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsWcType"><span class="hs-identifier hs-type">rnHsWcType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsWcType"><span class="hs-identifier hs-type">LHsWcType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsWcType"><span class="hs-identifier hs-type">LHsWcType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span id="rnHsWcType"><span class="annot"><span class="annottext">rnHsWcType :: HsDocContext -&gt; LHsWcType GhcPs -&gt; RnM (LHsWcType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsWcType"><span class="hs-identifier hs-var hs-var">rnHsWcType</span></a></span></span><span> </span><span id="local-6989586621681129979"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129979"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsWC"><span class="hs-identifier hs-type">HsWC</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hswc_body :: forall pass thing. HsWildCardBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hswc_body"><span class="hs-identifier hs-var">hswc_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129978"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129978"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129977"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129977"><span class="hs-identifier hs-var">free_vars</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScopeM"><span class="hs-identifier hs-var">filterInScopeM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129978"><span class="hs-identifier hs-var">hs_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129976"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129976"><span class="hs-identifier hs-var">nwc_rdrs'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM (FreeKiTyVars, FreeKiTyVars)
</span><a href="GHC.Rename.HsType.html#partition_nwcs"><span class="hs-identifier hs-var">partition_nwcs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129977"><span class="hs-identifier hs-var">free_vars</span></a></span><span>
</span><span id="line-183"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129975"><span class="annot"><span class="annottext">nwc_rdrs :: FreeKiTyVars
</span><a href="#local-6989586621681129975"><span class="hs-identifier hs-var hs-var">nwc_rdrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars
forall a. Eq a =&gt; [Located a] -&gt; [Located a]
</span><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier hs-var">nubL</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129976"><span class="hs-identifier hs-var">nwc_rdrs'</span></a></span><span>
</span><span id="line-184"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129974"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129974"><span class="hs-identifier hs-var">wcs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129973"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129973"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129972"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129972"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; FreeKiTyVars
-&gt; LHsType GhcPs
-&gt; RnM ([Name], LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnWcBody"><span class="hs-identifier hs-var">rnWcBody</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129979"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129975"><span class="hs-identifier hs-var">nwc_rdrs</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129978"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-185"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129971"><span class="annot"><span class="annottext">sig_ty' :: LHsWcType GhcRn
</span><a href="#local-6989586621681129971"><span class="hs-identifier hs-var hs-var">sig_ty'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsWC :: forall pass thing.
XHsWC pass thing -&gt; thing -&gt; HsWildCardBndrs pass thing
</span><a href="GHC.Hs.Type.html#HsWC"><span class="hs-identifier hs-type">HsWC</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hswc_ext :: XHsWC GhcRn (LHsType GhcRn)
</span><a href="GHC.Hs.Type.html#hswc_ext"><span class="hs-identifier hs-var">hswc_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
XHsWC GhcRn (LHsType GhcRn)
</span><a href="#local-6989586621681129974"><span class="hs-identifier hs-var">wcs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hswc_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hswc_body"><span class="hs-identifier hs-var">hswc_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129973"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-186"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsWcType GhcRn, FreeVars) -&gt; RnM (LHsWcType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsWcType GhcRn
</span><a href="#local-6989586621681129971"><span class="hs-identifier hs-var">sig_ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129972"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnWcBody"><span class="hs-identifier hs-type">rnWcBody</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-189"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span id="rnWcBody"><span class="annot"><span class="annottext">rnWcBody :: HsDocContext
-&gt; FreeKiTyVars
-&gt; LHsType GhcPs
-&gt; RnM ([Name], LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnWcBody"><span class="hs-identifier hs-var hs-var">rnWcBody</span></a></span></span><span> </span><span id="local-6989586621681129970"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129970"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129969"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129969"><span class="hs-identifier hs-var">nwc_rdrs</span></a></span></span><span> </span><span id="local-6989586621681129968"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129968"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129967"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129967"><span class="hs-identifier hs-var">nwcs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name)
-&gt; FreeKiTyVars -&gt; IOEnv (Env TcGblEnv TcLclEnv) [Name]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier hs-var">newLocalBndrRn</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129969"><span class="hs-identifier hs-var">nwc_rdrs</span></a></span><span>
</span><span id="line-192"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129965"><span class="annot"><span class="annottext">env :: RnTyKiEnv
</span><a href="#local-6989586621681129965"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RTKE :: HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; FreeVars -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#RTKE"><span class="hs-identifier hs-type">RTKE</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_level :: TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span>
</span><span id="line-193"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_what :: RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var">rtke_what</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span>
</span><span id="line-194"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_nwcs :: FreeVars
</span><a href="GHC.Rename.HsType.html#rtke_nwcs"><span class="hs-identifier hs-var">rtke_nwcs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#mkNameSet"><span class="hs-identifier hs-var">mkNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129967"><span class="hs-identifier hs-var">nwcs</span></a></span><span>
</span><span id="line-195"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_ctxt :: HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var">rtke_ctxt</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129970"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-196"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129956"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129956"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129955"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129955"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier hs-var">bindLocalNamesFV</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129967"><span class="hs-identifier hs-var">nwcs</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-197"></span><span>                          </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129954"><span class="hs-identifier hs-var">rn_lty</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129965"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129968"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-198"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Name], LHsType GhcRn, FreeVars)
-&gt; RnM ([Name], LHsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129967"><span class="hs-identifier hs-var">nwcs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129956"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129955"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-199"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-200"></span><span>    </span><span id="local-6989586621681129954"><span class="annot"><span class="annottext">rn_lty :: RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129954"><span class="hs-identifier hs-var hs-var">rn_lty</span></a></span></span><span> </span><span id="local-6989586621681129951"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129951"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129949"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129949"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129948"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129948"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129949"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-202"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129946"><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129946"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129945"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129945"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129944"><span class="hs-identifier hs-var">rn_ty</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129951"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129948"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-203"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsType GhcRn -&gt; LHsType GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129949"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129946"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129945"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>    </span><span class="annot"><a href="#local-6989586621681129944"><span class="hs-identifier hs-type">rn_ty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>    </span><span class="hs-comment">-- A lot of faff just to allow the extra-constraints wildcard to appear</span><span>
</span><span id="line-207"></span><span>    </span><span id="local-6989586621681129944"><span class="annot"><span class="annottext">rn_ty :: RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129944"><span class="hs-identifier hs-var hs-var">rn_ty</span></a></span></span><span> </span><span id="local-6989586621681129943"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129943"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_tele :: forall pass. HsType pass -&gt; HsForAllTelescope pass
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129940"><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129940"><span class="hs-identifier hs-var">tele</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129938"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129938"><span class="hs-identifier hs-var">hs_body</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; HsForAllTelescope GhcPs
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; RnM (HsType GhcRn, FreeVars)
forall a.
HsDocContext
-&gt; HsForAllTelescope GhcPs
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindHsForAllTelescope"><span class="hs-identifier hs-var">bindHsForAllTelescope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129943"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129940"><span class="hs-identifier hs-var">tele</span></a></span><span> </span><span class="annot"><span class="annottext">((HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
 -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; RnM (HsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129937"><span class="annot"><span class="annottext">HsForAllTelescope GhcRn
</span><a href="#local-6989586621681129937"><span class="hs-identifier hs-var">tele'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-209"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129936"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129936"><span class="hs-identifier hs-var">hs_body'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129935"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129935"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129954"><span class="hs-identifier hs-var">rn_lty</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129943"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129938"><span class="hs-identifier hs-var">hs_body</span></a></span><span>
</span><span id="line-210"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsForAllTy :: forall pass.
XForAllTy pass
-&gt; HsForAllTelescope pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_xforall :: XForAllTy GhcRn
</span><a href="GHC.Hs.Type.html#hst_xforall"><span class="hs-identifier hs-var">hst_xforall</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XForAllTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-211"></span><span>                                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_tele :: HsForAllTelescope GhcRn
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcRn
</span><a href="#local-6989586621681129937"><span class="hs-identifier hs-var">tele'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129936"><span class="hs-identifier hs-var">hs_body'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-212"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129935"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span>    </span><span class="annot"><a href="#local-6989586621681129944"><span class="hs-identifier hs-var">rn_ty</span></a></span><span> </span><span id="local-6989586621681129932"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: forall pass. HsType pass -&gt; LHsContext pass
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129929"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129929"><span class="hs-identifier hs-var">cx</span></a></span></span><span> </span><span id="local-6989586621681129928"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129928"><span class="hs-identifier hs-var">hs_ctxt</span></a></span></span><span>
</span><span id="line-215"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129927"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129927"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129926"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129926"><span class="hs-identifier hs-var">hs_ctxt1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129925"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129925"><span class="hs-identifier hs-var">hs_ctxt_last</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; Maybe (HsContext GhcPs, LHsType GhcPs)
forall a. [a] -&gt; Maybe ([a], a)
</span><a href="GHC.Utils.Misc.html#snocView"><span class="hs-identifier hs-var">snocView</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129928"><span class="hs-identifier hs-var">hs_ctxt</span></a></span><span>
</span><span id="line-217"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129923"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129923"><span class="hs-identifier hs-var">lx</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsWildCardTy"><span class="hs-identifier hs-type">HsWildCardTy</span></a></span><span> </span><span class="annot"><span class="annottext">XWildCardTy GhcPs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; LHsType GhcPs
forall pass. LHsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#ignoreParens"><span class="hs-identifier hs-var">ignoreParens</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129925"><span class="hs-identifier hs-var">hs_ctxt_last</span></a></span><span>
</span><span id="line-218"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129920"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129920"><span class="hs-identifier hs-var">hs_ctxt1'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129919"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129919"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129918"><span class="hs-identifier hs-var">rn_top_constraint</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129926"><span class="hs-identifier hs-var">hs_ctxt1</span></a></span><span>
</span><span id="line-219"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; TcRn () -&gt; TcRn ()
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129923"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsContext GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkExtraConstraintWildCard"><span class="hs-identifier hs-var">checkExtraConstraintWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129926"><span class="hs-identifier hs-var">hs_ctxt1</span></a></span><span>
</span><span id="line-220"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129916"><span class="annot"><span class="annottext">hs_ctxt' :: [LHsType GhcRn]
</span><a href="#local-6989586621681129916"><span class="hs-identifier hs-var hs-var">hs_ctxt'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129920"><span class="hs-identifier hs-var">hs_ctxt1'</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn] -&gt; [LHsType GhcRn] -&gt; [LHsType GhcRn]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsType GhcRn -&gt; LHsType GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129923"><span class="hs-identifier hs-var">lx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XWildCardTy GhcRn -&gt; HsType GhcRn
forall pass. XWildCardTy pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsWildCardTy"><span class="hs-identifier hs-var">HsWildCardTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XWildCardTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-221"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129915"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129915"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129914"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129914"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129927"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-222"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsQualTy :: forall pass.
XQualTy pass -&gt; LHsContext pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_xqual :: XQualTy GhcRn
</span><a href="GHC.Hs.Type.html#hst_xqual"><span class="hs-identifier hs-var">hst_xqual</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XQualTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-223"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: LHsContext GhcRn
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; [LHsType GhcRn] -&gt; LHsContext GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129929"><span class="hs-identifier hs-var">cx</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129916"><span class="hs-identifier hs-var">hs_ctxt'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129915"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-224"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129919"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129914"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-227"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129911"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129911"><span class="hs-identifier hs-var">hs_ctxt'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129910"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129910"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129918"><span class="hs-identifier hs-var">rn_top_constraint</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129928"><span class="hs-identifier hs-var">hs_ctxt</span></a></span><span>
</span><span id="line-228"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129909"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129909"><span class="hs-identifier hs-var">hs_ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129908"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129908"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129932"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129927"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-229"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsQualTy :: forall pass.
XQualTy pass -&gt; LHsContext pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_xqual :: XQualTy GhcRn
</span><a href="GHC.Hs.Type.html#hst_xqual"><span class="hs-identifier hs-var">hst_xqual</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XQualTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-230"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: LHsContext GhcRn
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; [LHsType GhcRn] -&gt; LHsContext GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129929"><span class="hs-identifier hs-var">cx</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129911"><span class="hs-identifier hs-var">hs_ctxt'</span></a></span><span>
</span><span id="line-231"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129909"><span class="hs-identifier hs-var">hs_ty'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-232"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129910"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129908"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span>    </span><span class="annot"><a href="#local-6989586621681129944"><span class="hs-identifier hs-var">rn_ty</span></a></span><span> </span><span id="local-6989586621681129907"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129907"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129906"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129906"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129907"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129906"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span>    </span><span id="local-6989586621681129918"><span class="annot"><span class="annottext">rn_top_constraint :: RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="#local-6989586621681129918"><span class="hs-identifier hs-var hs-var">rn_top_constraint</span></a></span></span><span> </span><span id="local-6989586621681129904"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129904"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129904"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_what :: RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var">rtke_what</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTopConstraint"><span class="hs-identifier hs-var">RnTopConstraint</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkExtraConstraintWildCard"><span class="hs-identifier hs-type">checkExtraConstraintWildCard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsContext"><span class="hs-identifier hs-type">HsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-240"></span><span class="hs-comment">-- Rename the extra-constraint spot in a type signature</span><span>
</span><span id="line-241"></span><span class="hs-comment">--    (blah, _) =&gt; type</span><span>
</span><span id="line-242"></span><span class="hs-comment">-- Check that extra-constraints are allowed at all, and</span><span>
</span><span id="line-243"></span><span class="hs-comment">-- if so that it's an anonymous wildcard</span><span>
</span><span id="line-244"></span><span id="checkExtraConstraintWildCard"><span class="annot"><span class="annottext">checkExtraConstraintWildCard :: RnTyKiEnv -&gt; HsContext GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkExtraConstraintWildCard"><span class="hs-identifier hs-var hs-var">checkExtraConstraintWildCard</span></a></span></span><span> </span><span id="local-6989586621681129902"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129902"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129901"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129901"><span class="hs-identifier hs-var">hs_ctxt</span></a></span></span><span>
</span><span id="line-245"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Maybe MsgDoc -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-var">checkWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129902"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
</span><a href="#local-6989586621681129899"><span class="hs-identifier hs-var">mb_bad</span></a></span><span>
</span><span id="line-246"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-247"></span><span>    </span><span id="local-6989586621681129899"><span class="annot"><span class="annottext">mb_bad :: Maybe MsgDoc
</span><a href="#local-6989586621681129899"><span class="hs-identifier hs-var hs-var">mb_bad</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#extraConstraintWildCardsAllowed"><span class="hs-identifier hs-var">extraConstraintWildCardsAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129902"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129896"><span class="hs-identifier hs-var">base_msg</span></a></span><span>
</span><span id="line-249"></span><span>             </span><span class="hs-comment">-- Currently, we do not allow wildcards in their full glory in</span><span>
</span><span id="line-250"></span><span>             </span><span class="hs-comment">-- standalone deriving declarations. We only allow a single</span><span>
</span><span id="line-251"></span><span>             </span><span class="hs-comment">-- extra-constraints wildcard &#224; la:</span><span>
</span><span id="line-252"></span><span>             </span><span class="hs-comment">--</span><span>
</span><span id="line-253"></span><span>             </span><span class="hs-comment">--   deriving instance _ =&gt; Eq (Foo a)</span><span>
</span><span id="line-254"></span><span>             </span><span class="hs-comment">--</span><span>
</span><span id="line-255"></span><span>             </span><span class="hs-comment">-- i.e., we don't support things like</span><span>
</span><span id="line-256"></span><span>             </span><span class="hs-comment">--</span><span>
</span><span id="line-257"></span><span>             </span><span class="hs-comment">--   deriving instance (Eq a, _) =&gt; Eq (Foo a)</span><span>
</span><span id="line-258"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#DerivDeclCtx"><span class="hs-identifier hs-type">DerivDeclCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129902"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-259"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129901"><span class="hs-identifier hs-var">hs_ctxt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129893"><span class="hs-identifier hs-var">deriv_decl_msg</span></a></span><span>
</span><span id="line-261"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-262"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span>    </span><span id="local-6989586621681129896"><span class="annot"><span class="annottext">base_msg :: MsgDoc
</span><a href="#local-6989586621681129896"><span class="hs-identifier hs-var hs-var">base_msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Extra-constraint wildcard&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Hs.Type.html#pprAnonWildCard"><span class="hs-identifier hs-var">pprAnonWildCard</span></a></span><span>
</span><span id="line-265"></span><span>                   </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;not allowed&quot;</span></span><span>
</span><span id="line-266"></span><span>
</span><span id="line-267"></span><span>    </span><span id="local-6989586621681129893"><span class="annot"><span class="annottext">deriv_decl_msg :: MsgDoc
</span><a href="#local-6989586621681129893"><span class="hs-identifier hs-var hs-var">deriv_decl_msg</span></a></span></span><span>
</span><span id="line-268"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129896"><span class="hs-identifier hs-var">base_msg</span></a></span><span>
</span><span id="line-269"></span><span>           </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;except as the sole constraint&quot;</span></span><span>
</span><span id="line-270"></span><span>                   </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;e.g., deriving instance _ =&gt; Eq (Foo a)&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span class="annot"><a href="GHC.Rename.HsType.html#extraConstraintWildCardsAllowed"><span class="hs-identifier hs-type">extraConstraintWildCardsAllowed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-273"></span><span id="extraConstraintWildCardsAllowed"><span class="annot"><span class="annottext">extraConstraintWildCardsAllowed :: RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#extraConstraintWildCardsAllowed"><span class="hs-identifier hs-var hs-var">extraConstraintWildCardsAllowed</span></a></span></span><span> </span><span id="local-6989586621681129885"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129885"><span class="hs-identifier hs-var">env</span></a></span></span><span>
</span><span id="line-274"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129885"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-275"></span><span>      </span><span class="annot"><a href="GHC.Rename.Utils.html#TypeSigCtx"><span class="hs-identifier hs-type">TypeSigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-276"></span><span>      </span><span class="annot"><a href="GHC.Rename.Utils.html#ExprWithTySigCtx"><span class="hs-identifier hs-type">ExprWithTySigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-277"></span><span>      </span><span class="annot"><a href="GHC.Rename.Utils.html#DerivDeclCtx"><span class="hs-identifier hs-type">DerivDeclCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-278"></span><span>      </span><span class="annot"><a href="GHC.Rename.Utils.html#StandaloneKindSigCtx"><span class="hs-identifier hs-type">StandaloneKindSigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-comment">-- See Note [Wildcards in standalone kind signatures] in &quot;GHC.Hs.Decls&quot;</span><span>
</span><span id="line-279"></span><span>      </span><span class="annot"><span class="annottext">HsDocContext
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- | When the NamedWildCards extension is enabled, partition_nwcs</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- removes type variables that start with an underscore from the</span><span>
</span><span id="line-283"></span><span class="hs-comment">-- FreeKiTyVars in the argument and returns them in a separate list.</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- When the extension is disabled, the function returns the argument</span><span>
</span><span id="line-285"></span><span class="hs-comment">-- and empty list.  See Note [Renaming named wild cards]</span><span>
</span><span id="line-286"></span><span class="annot"><a href="GHC.Rename.HsType.html#partition_nwcs"><span class="hs-identifier hs-type">partition_nwcs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span id="partition_nwcs"><span class="annot"><span class="annottext">partition_nwcs :: FreeKiTyVars -&gt; RnM (FreeKiTyVars, FreeKiTyVars)
</span><a href="GHC.Rename.HsType.html#partition_nwcs"><span class="hs-identifier hs-var hs-var">partition_nwcs</span></a></span></span><span> </span><span id="local-6989586621681129881"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129881"><span class="hs-identifier hs-var">free_vars</span></a></span></span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129880"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129880"><span class="hs-identifier hs-var">wildcards_enabled</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#NamedWildCards"><span class="hs-identifier hs-var">LangExt.NamedWildCards</span></a></span><span>
</span><span id="line-289"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars, FreeKiTyVars) -&gt; RnM (FreeKiTyVars, FreeKiTyVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">((FreeKiTyVars, FreeKiTyVars) -&gt; RnM (FreeKiTyVars, FreeKiTyVars))
-&gt; (FreeKiTyVars, FreeKiTyVars) -&gt; RnM (FreeKiTyVars, FreeKiTyVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-290"></span><span>           </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129880"><span class="hs-identifier hs-var">wildcards_enabled</span></a></span><span>
</span><span id="line-291"></span><span>           </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; Bool)
-&gt; FreeKiTyVars -&gt; (FreeKiTyVars, FreeKiTyVars)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/Data.OldList.html#partition"><span class="hs-identifier hs-var">partition</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; Bool
</span><a href="#local-6989586621681129878"><span class="hs-identifier hs-var">is_wildcard</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129881"><span class="hs-identifier hs-var">free_vars</span></a></span><span>
</span><span id="line-292"></span><span>           </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129881"><span class="hs-identifier hs-var">free_vars</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-293"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-294"></span><span>     </span><span class="annot"><a href="#local-6989586621681129878"><span class="hs-identifier hs-type">is_wildcard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-295"></span><span>     </span><span id="local-6989586621681129878"><span class="annot"><span class="annottext">is_wildcard :: GenLocated SrcSpan RdrName -&gt; Bool
</span><a href="#local-6989586621681129878"><span class="hs-identifier hs-var hs-var">is_wildcard</span></a></span></span><span> </span><span id="local-6989586621681129877"><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681129877"><span class="hs-identifier hs-var">rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; Bool
</span><a href="GHC.Types.Name.Occurrence.html#startsWithUnderscore"><span class="hs-identifier hs-var">startsWithUnderscore</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; OccName
</span><a href="GHC.Types.Name.Reader.html#rdrNameOcc"><span class="hs-identifier hs-var">rdrNameOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681129877"><span class="hs-identifier hs-var">rdr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="hs-comment">{- Note [Renaming named wild cards]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Identifiers starting with an underscore are always parsed as type variables.
It is only here in the renamer that we give the special treatment.
See Note [The wildcard story for types] in GHC.Hs.Type.

It's easy!  When we collect the implicitly bound type variables, ready
to bring them into scope, and NamedWildCards is on, we partition the
variables into the ones that start with an underscore (the named
wildcards) and the rest. Then we just add them to the hswc_wcs field
of the HsWildCardBndrs structure, and we are done.


*********************************************************
*                                                       *
           HsSigtype (i.e. no wildcards)
*                                                       *
****************************************************** -}</span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsSigType"><span class="hs-identifier hs-type">rnHsSigType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-317"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TypeOrKind"><span class="hs-identifier hs-type">TypeOrKind</span></a></span><span>
</span><span id="line-318"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsSigType"><span class="hs-identifier hs-type">LHsSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-319"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsSigType"><span class="hs-identifier hs-type">LHsSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- Used for source-language type signatures</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- that cannot have wildcards</span><span>
</span><span id="line-322"></span><span id="rnHsSigType"><span class="annot"><span class="annottext">rnHsSigType :: HsDocContext
-&gt; TypeOrKind
-&gt; HsImplicitBndrs GhcPs (LHsType GhcPs)
-&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsSigType"><span class="hs-identifier hs-var hs-var">rnHsSigType</span></a></span></span><span> </span><span id="local-6989586621681129872"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129872"><span class="hs-identifier hs-var">ctx</span></a></span></span><span> </span><span id="local-6989586621681129871"><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129871"><span class="hs-identifier hs-var">level</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_body :: forall pass thing. HsImplicitBndrs pass thing -&gt; thing
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129870"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129870"><span class="hs-identifier hs-var">hs_ty</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rnHsSigType&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129870"><span class="hs-identifier hs-var">hs_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129867"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129867"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM LocalRdrEnv
</span><a href="GHC.Tc.Utils.Monad.html#getLocalRdrEnv"><span class="hs-identifier hs-var">getLocalRdrEnv</span></a></span><span>
</span><span id="line-325"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129865"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129865"><span class="hs-identifier hs-var">vars0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#forAllOrNothing"><span class="hs-identifier hs-var">forAllOrNothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; Bool
forall p. LHsType p -&gt; Bool
</span><a href="GHC.Hs.Type.html#isLHsForAllTy"><span class="hs-identifier hs-var">isLHsForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129870"><span class="hs-identifier hs-var">hs_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-326"></span><span>           </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; RnM FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; RnM FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScope"><span class="hs-identifier hs-var">filterInScope</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129867"><span class="hs-identifier hs-var">rdr_env</span></a></span><span>
</span><span id="line-327"></span><span>           </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129870"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-328"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe Any
-&gt; FreeKiTyVars
-&gt; ([Name]
    -&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars))
-&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars)
forall assoc a.
Maybe assoc
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier hs-var">rnImplicitBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Any
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129865"><span class="hs-identifier hs-var">vars0</span></a></span><span> </span><span class="annot"><span class="annottext">(([Name] -&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars))
 -&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars))
-&gt; ([Name]
    -&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars))
-&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129863"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129863"><span class="hs-identifier hs-var">vars</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-329"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129862"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129862"><span class="hs-identifier hs-var">body'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129861"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129861"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129872"><span class="hs-identifier hs-var">ctx</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129871"><span class="hs-identifier hs-var">level</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129870"><span class="hs-identifier hs-var">hs_ty</span></a></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars)
-&gt; RnM (HsImplicitBndrs GhcRn (LHsType GhcRn), FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">HsIB :: forall pass thing.
XHsIB pass thing -&gt; thing -&gt; HsImplicitBndrs pass thing
</span><a href="GHC.Hs.Type.html#HsIB"><span class="hs-identifier hs-type">HsIB</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsib_ext :: XHsIB GhcRn (LHsType GhcRn)
</span><a href="GHC.Hs.Type.html#hsib_ext"><span class="hs-identifier hs-var">hsib_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
XHsIB GhcRn (LHsType GhcRn)
</span><a href="#local-6989586621681129863"><span class="hs-identifier hs-var">vars</span></a></span><span>
</span><span id="line-332"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsib_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hsib_body"><span class="hs-identifier hs-var">hsib_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129862"><span class="hs-identifier hs-var">body'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-333"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129861"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-334"></span><span>
</span><span id="line-335"></span><span class="hs-comment">-- Note [forall-or-nothing rule]</span><span>
</span><span id="line-336"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-337"></span><span class="hs-comment">-- Free variables in signatures are usually bound in an implicit</span><span>
</span><span id="line-338"></span><span class="hs-comment">-- 'forall' at the beginning of user-written signatures. However, if the</span><span>
</span><span id="line-339"></span><span class="hs-comment">-- signature has an explicit forall at the beginning, this is disabled.</span><span>
</span><span id="line-340"></span><span class="hs-comment">--</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- The idea is nested foralls express something which is only</span><span>
</span><span id="line-342"></span><span class="hs-comment">-- expressible explicitly, while a top level forall could (usually) be</span><span>
</span><span id="line-343"></span><span class="hs-comment">-- replaced with an implicit binding. Top-level foralls alone (&quot;forall.&quot;) are</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- therefore an indication that the user is trying to be fastidious, so</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- we don't implicitly bind any variables.</span><span>
</span><span id="line-346"></span><span>
</span><span id="line-347"></span><span class="hs-comment">-- | See @Note [forall-or-nothing rule]@. This tiny little function is used</span><span>
</span><span id="line-348"></span><span class="hs-comment">-- (rather than its small body inlined) to indicate that we are implementing</span><span>
</span><span id="line-349"></span><span class="hs-comment">-- that rule.</span><span>
</span><span id="line-350"></span><span class="annot"><a href="GHC.Rename.HsType.html#forAllOrNothing"><span class="hs-identifier hs-type">forAllOrNothing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-351"></span><span>                </span><span class="hs-comment">-- ^ True &lt;=&gt; explicit forall</span><span>
</span><span id="line-352"></span><span>                </span><span class="hs-comment">-- E.g.  f :: forall a. a-&gt;b</span><span>
</span><span id="line-353"></span><span>                </span><span class="hs-comment">--  we do not want to bring 'b' into scope, hence True</span><span>
</span><span id="line-354"></span><span>                </span><span class="hs-comment">-- But   f :: a -&gt; b</span><span>
</span><span id="line-355"></span><span>                </span><span class="hs-comment">--  we want to bring both 'a' and 'b' into scope, hence False</span><span>
</span><span id="line-356"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-357"></span><span>                </span><span class="hs-comment">-- ^ Free vars of the type</span><span>
</span><span id="line-358"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-359"></span><span id="forAllOrNothing"><span class="annot"><span class="annottext">forAllOrNothing :: Bool -&gt; FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#forAllOrNothing"><span class="hs-identifier hs-var hs-var">forAllOrNothing</span></a></span></span><span> </span><span id="local-6989586621681129859"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129859"><span class="hs-identifier hs-var">has_outer_forall</span></a></span></span><span> </span><span id="local-6989586621681129858"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129858"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129859"><span class="hs-identifier hs-var">has_outer_forall</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-360"></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-361"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;forAllOrNothing&quot;</span></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;has explicit outer forall&quot;</span></span><span>
</span><span id="line-362"></span><span>    </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-363"></span><span>  </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-364"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;forAllOrNothing&quot;</span></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;no explicit forall. implicit binders:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129858"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-365"></span><span>    </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129858"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span id="local-6989586621681130657"><span id="local-6989586621681130658"><span class="annot"><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier hs-type">rnImplicitBndrs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130658"><span class="hs-identifier hs-type">assoc</span></a></span><span>
</span><span id="line-368"></span><span>                </span><span class="hs-comment">-- ^ @'Just' _@ =&gt; an associated type decl</span><span>
</span><span id="line-369"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-370"></span><span>                </span><span class="hs-comment">-- ^ Surface-syntax free vars that we will implicitly bind.</span><span>
</span><span id="line-371"></span><span>                </span><span class="hs-comment">-- May have duplicates, which are removed here.</span><span>
</span><span id="line-372"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130657"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-373"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130657"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-374"></span><span id="rnImplicitBndrs"><span class="annot"><span class="annottext">rnImplicitBndrs :: forall assoc a.
Maybe assoc
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier hs-var hs-var">rnImplicitBndrs</span></a></span></span><span> </span><span id="local-6989586621681129849"><span class="annot"><span class="annottext">Maybe assoc
</span><a href="#local-6989586621681129849"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span id="local-6989586621681129848"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129848"><span class="hs-identifier hs-var">implicit_vs_with_dups</span></a></span></span><span> </span><span id="local-6989586621681129847"><span class="annot"><span class="annottext">[Name] -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129847"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-375"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129846"><span class="annot"><span class="annottext">implicit_vs :: FreeKiTyVars
</span><a href="#local-6989586621681129846"><span class="hs-identifier hs-var hs-var">implicit_vs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars
forall a. Eq a =&gt; [Located a] -&gt; [Located a]
</span><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier hs-var">nubL</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129848"><span class="hs-identifier hs-var">implicit_vs_with_dups</span></a></span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rnImplicitBndrs&quot;</span></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-378"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129848"><span class="hs-identifier hs-var">implicit_vs_with_dups</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129846"><span class="hs-identifier hs-var">implicit_vs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span>         </span><span class="hs-comment">-- Use the currently set SrcSpan as the new source location for each Name.</span><span>
</span><span id="line-381"></span><span>         </span><span class="hs-comment">-- See Note [Source locations for implicitly bound type variables].</span><span>
</span><span id="line-382"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129845"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129845"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRn SrcSpan
</span><a href="GHC.Tc.Utils.Monad.html#getSrcSpanM"><span class="hs-identifier hs-var">getSrcSpanM</span></a></span><span>
</span><span id="line-383"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129843"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129843"><span class="hs-identifier hs-var">vars</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name)
-&gt; FreeKiTyVars -&gt; IOEnv (Env TcGblEnv TcLclEnv) [Name]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe assoc
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall a.
Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier hs-var">newTyVarNameRn</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe assoc
</span><a href="#local-6989586621681129849"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name)
-&gt; (GenLocated SrcSpan RdrName -&gt; GenLocated SrcSpan RdrName)
-&gt; GenLocated SrcSpan RdrName
-&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; GenLocated SrcSpan RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129845"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(RdrName -&gt; GenLocated SrcSpan RdrName)
-&gt; (GenLocated SrcSpan RdrName -&gt; RdrName)
-&gt; GenLocated SrcSpan RdrName
-&gt; GenLocated SrcSpan RdrName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129846"><span class="hs-identifier hs-var">implicit_vs</span></a></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier hs-var">bindLocalNamesFV</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129843"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (a, FreeVars) -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-386"></span><span>         </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129847"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129843"><span class="hs-identifier hs-var">vars</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="hs-comment">{-
Note [Source locations for implicitly bound type variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When bringing implicitly bound type variables into scope (in rnImplicitBndrs),
we do something peculiar: we drop the original SrcSpan attached to each
variable and replace it with the currently set SrcSpan. Moreover, this new
SrcSpan is usually /less/ precise than the original one, and that's OK. To see
why this is done, consider the following example:

  f :: a -&gt; b -&gt; a

Suppose that a warning or error message needs to point to the SrcSpans of the
binding sites for `a` and `b`. But where /are/ they bound, anyway? Technically,
they're bound by an unwritten `forall` at the front of the type signature, but
there is no SrcSpan for that. We could point to the first occurrence of `a` as
the binding site for `a`, but that would make the first occurrence of `a`
special. Moreover, we don't want IDEs to confuse binding sites and occurrences.

As a result, we make the `SrcSpan`s for `a` and `b` span the entirety of the
type signature, since the type signature implicitly carries their binding
sites. This is less precise, but more accurate.
-}</span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="hs-comment">{- ******************************************************
*                                                       *
           LHsType and HsType
*                                                       *
****************************************************** -}</span><span>
</span><span id="line-416"></span><span>
</span><span id="line-417"></span><span class="hs-comment">{-
rnHsType is here because we call it from loadInstDecl, and I didn't
want a gratuitous knot.

Note [QualTy in kinds]
~~~~~~~~~~~~~~~~~~~~~~
I was wondering whether QualTy could occur only at TypeLevel.  But no,
we can have a qualified type in a kind too. Here is an example:

  type family F a where
    F Bool = Nat
    F Nat  = Type

  type family G a where
    G Type = Type -&gt; Type
    G ()   = Nat

  data X :: forall k1 k2. (F k1 ~ G k2) =&gt; k1 -&gt; k2 -&gt; Type where
    MkX :: X 'True '()

See that k1 becomes Bool and k2 becomes (), so the equality is
satisfied. If I write MkX :: X 'True 'False, compilation fails with a
suitable message:

  MkX :: X 'True '()
    &#8226; Couldn't match kind &#8216;G Bool&#8217; with &#8216;Nat&#8217;
      Expected kind: G Bool
        Actual kind: F Bool

However: in a kind, the constraints in the QualTy must all be
equalities; or at least, any kinds with a class constraint are
uninhabited.
-}</span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="hs-keyword">data</span><span> </span><span id="RnTyKiEnv"><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-var">RnTyKiEnv</span></a></span></span><span>
</span><span id="line-452"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="RTKE"><span class="annot"><a href="GHC.Rename.HsType.html#RTKE"><span class="hs-identifier hs-var">RTKE</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="rtke_ctxt"><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-453"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="rtke_level"><span class="annot"><span class="annottext">RnTyKiEnv -&gt; TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var hs-var">rtke_level</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TypeOrKind"><span class="hs-identifier hs-type">TypeOrKind</span></a></span><span>  </span><span class="hs-comment">-- Am I renaming a type or a kind?</span><span>
</span><span id="line-454"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="rtke_what"><span class="annot"><span class="annottext">RnTyKiEnv -&gt; RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var hs-var">rtke_what</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiWhat"><span class="hs-identifier hs-type">RnTyKiWhat</span></a></span><span>  </span><span class="hs-comment">-- And within that what am I renaming?</span><span>
</span><span id="line-455"></span><span>         </span><span class="hs-special">,</span><span> </span><span id="rtke_nwcs"><span class="annot"><span class="annottext">RnTyKiEnv -&gt; FreeVars
</span><a href="GHC.Rename.HsType.html#rtke_nwcs"><span class="hs-identifier hs-var hs-var">rtke_nwcs</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NameSet"><span class="hs-identifier hs-type">NameSet</span></a></span><span>     </span><span class="hs-comment">-- These are the in-scope named wildcards</span><span>
</span><span id="line-456"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="hs-keyword">data</span><span> </span><span id="RnTyKiWhat"><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiWhat"><span class="hs-identifier hs-var">RnTyKiWhat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="RnTypeBody"><span class="annot"><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span></span><span>
</span><span id="line-459"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="RnTopConstraint"><span class="annot"><a href="GHC.Rename.HsType.html#RnTopConstraint"><span class="hs-identifier hs-var">RnTopConstraint</span></a></span></span><span>   </span><span class="hs-comment">-- Top-level context of HsSigWcTypes</span><span>
</span><span id="line-460"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="RnConstraint"><span class="annot"><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span></span><span>      </span><span class="hs-comment">-- All other constraints</span><span>
</span><span id="line-461"></span><span>
</span><span id="line-462"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681129837"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-463"></span><span>  </span><span id="local-6989586621681129830"><span class="annot"><span class="annottext">ppr :: RnTyKiEnv -&gt; MsgDoc
</span><a href="#local-6989586621681129830"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#RTKE"><span class="hs-identifier hs-type">RTKE</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_level :: RnTyKiEnv -&gt; TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129829"><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129829"><span class="hs-identifier hs-var">lev</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_what :: RnTyKiEnv -&gt; RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var">rtke_what</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129828"><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="#local-6989586621681129828"><span class="hs-identifier hs-var">what</span></a></span></span><span>
</span><span id="line-464"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_nwcs :: RnTyKiEnv -&gt; FreeVars
</span><a href="GHC.Rename.HsType.html#rtke_nwcs"><span class="hs-identifier hs-var">rtke_nwcs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129827"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129827"><span class="hs-identifier hs-var">wcs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_ctxt :: RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var">rtke_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129826"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129826"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-465"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RTKE&quot;</span></span><span>
</span><span id="line-466"></span><span>      </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">TypeOrKind -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129829"><span class="hs-identifier hs-var">lev</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="#local-6989586621681129828"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129827"><span class="hs-identifier hs-var">wcs</span></a></span><span>
</span><span id="line-467"></span><span>                      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#pprHsDocContext"><span class="hs-identifier hs-var">pprHsDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129826"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-468"></span><span>
</span><span id="line-469"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681129821"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiWhat"><span class="hs-identifier hs-type">RnTyKiWhat</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-470"></span><span>  </span><span id="local-6989586621681129820"><span class="annot"><span class="annottext">ppr :: RnTyKiWhat -&gt; MsgDoc
</span><a href="#local-6989586621681129820"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RnTypeBody&quot;</span></span><span>
</span><span id="line-471"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTopConstraint"><span class="hs-identifier hs-var">RnTopConstraint</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RnTopConstraint&quot;</span></span><span>
</span><span id="line-472"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RnConstraint&quot;</span></span><span>
</span><span id="line-473"></span><span>
</span><span id="line-474"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-type">mkTyKiEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#TypeOrKind"><span class="hs-identifier hs-type">TypeOrKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiWhat"><span class="hs-identifier hs-type">RnTyKiWhat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span>
</span><span id="line-475"></span><span id="mkTyKiEnv"><span class="annot"><span class="annottext">mkTyKiEnv :: HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var hs-var">mkTyKiEnv</span></a></span></span><span> </span><span id="local-6989586621681129819"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129819"><span class="hs-identifier hs-var">cxt</span></a></span></span><span> </span><span id="local-6989586621681129818"><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129818"><span class="hs-identifier hs-var">level</span></a></span></span><span> </span><span id="local-6989586621681129817"><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="#local-6989586621681129817"><span class="hs-identifier hs-var">what</span></a></span></span><span>
</span><span id="line-476"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RTKE :: HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; FreeVars -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#RTKE"><span class="hs-identifier hs-type">RTKE</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_level :: TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="#local-6989586621681129818"><span class="hs-identifier hs-var">level</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_nwcs :: FreeVars
</span><a href="GHC.Rename.HsType.html#rtke_nwcs"><span class="hs-identifier hs-var">rtke_nwcs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span>
</span><span id="line-477"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_what :: RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var">rtke_what</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="#local-6989586621681129817"><span class="hs-identifier hs-var">what</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">rtke_ctxt :: HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var">rtke_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129819"><span class="hs-identifier hs-var">cxt</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-478"></span><span>
</span><span id="line-479"></span><span class="annot"><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-type">isRnKindLevel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-480"></span><span id="isRnKindLevel"><span class="annot"><span class="annottext">isRnKindLevel :: RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var hs-var">isRnKindLevel</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#RTKE"><span class="hs-identifier hs-type">RTKE</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_level :: RnTyKiEnv -&gt; TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#KindLevel"><span class="hs-identifier hs-var">KindLevel</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-481"></span><span class="annot"><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span>                                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-482"></span><span>
</span><span id="line-483"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-484"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier hs-type">rnLHsType</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-485"></span><span id="rnLHsType"><span class="annot"><span class="annottext">rnLHsType :: HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier hs-var hs-var">rnLHsType</span></a></span></span><span> </span><span id="local-6989586621681129813"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129813"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129812"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129812"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129813"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129812"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-486"></span><span>
</span><span id="line-487"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypes"><span class="hs-identifier hs-type">rnLHsTypes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-488"></span><span id="rnLHsTypes"><span class="annot"><span class="annottext">rnLHsTypes :: HsDocContext -&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTypes"><span class="hs-identifier hs-var hs-var">rnLHsTypes</span></a></span></span><span> </span><span id="local-6989586621681129811"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129811"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129810"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129810"><span class="hs-identifier hs-var">tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier hs-var">rnLHsType</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129811"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129810"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-489"></span><span>
</span><span id="line-490"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnScaledLHsType"><span class="hs-identifier hs-type">rnScaledLHsType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-type">HsScaled</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>                                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-type">HsScaled</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-492"></span><span id="rnScaledLHsType"><span class="annot"><span class="annottext">rnScaledLHsType :: HsDocContext
-&gt; HsScaled GhcPs (LHsType GhcPs)
-&gt; RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars)
</span><a href="GHC.Rename.HsType.html#rnScaledLHsType"><span class="hs-identifier hs-var hs-var">rnScaledLHsType</span></a></span></span><span> </span><span id="local-6989586621681129809"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129809"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-type">HsScaled</span></a></span><span> </span><span id="local-6989586621681129807"><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129807"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621681129806"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129806"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-493"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681129805"><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129805"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129804"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129804"><span class="hs-identifier hs-var">fvs_w</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsArrow GhcPs -&gt; RnM (HsArrow GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-var">rnHsArrow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129809"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129807"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-494"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681129802"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129802"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129801"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129801"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier hs-var">rnLHsType</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129809"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129806"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-495"></span><span>  </span><span class="annot"><span class="annottext">(HsScaled GhcRn (LHsType GhcRn), FreeVars)
-&gt; RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsArrow GhcRn -&gt; LHsType GhcRn -&gt; HsScaled GhcRn (LHsType GhcRn)
forall pass a. HsArrow pass -&gt; a -&gt; HsScaled pass a
</span><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-var">HsScaled</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129805"><span class="hs-identifier hs-var">w'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129802"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129801"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129804"><span class="hs-identifier hs-var">fvs_w</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsType"><span class="hs-identifier hs-type">rnHsType</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-499"></span><span id="rnHsType"><span class="annot"><span class="annottext">rnHsType :: HsDocContext -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsType"><span class="hs-identifier hs-var hs-var">rnHsType</span></a></span></span><span> </span><span id="local-6989586621681129800"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129800"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129799"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129799"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129800"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129799"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsKind"><span class="hs-identifier hs-type">rnLHsKind</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsKind"><span class="hs-identifier hs-type">LHsKind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsKind"><span class="hs-identifier hs-type">LHsKind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-502"></span><span id="rnLHsKind"><span class="annot"><span class="annottext">rnLHsKind :: HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsKind"><span class="hs-identifier hs-var hs-var">rnLHsKind</span></a></span></span><span> </span><span id="local-6989586621681129798"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129798"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129797"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129797"><span class="hs-identifier hs-var">kind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129798"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#KindLevel"><span class="hs-identifier hs-var">KindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129797"><span class="hs-identifier hs-var">kind</span></a></span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsKind"><span class="hs-identifier hs-type">rnHsKind</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsKind"><span class="hs-identifier hs-type">HsKind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsKind"><span class="hs-identifier hs-type">HsKind</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span id="rnHsKind"><span class="annot"><span class="annottext">rnHsKind :: HsDocContext -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsKind"><span class="hs-identifier hs-var hs-var">rnHsKind</span></a></span></span><span> </span><span id="local-6989586621681129795"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129795"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129794"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129794"><span class="hs-identifier hs-var">kind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129795"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#KindLevel"><span class="hs-identifier hs-var">KindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129794"><span class="hs-identifier hs-var">kind</span></a></span><span>
</span><span id="line-506"></span><span>
</span><span id="line-507"></span><span class="hs-comment">-- renaming a type only, not a kind</span><span>
</span><span id="line-508"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypeArg"><span class="hs-identifier hs-type">rnLHsTypeArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-509"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-510"></span><span id="rnLHsTypeArg"><span class="annot"><span class="annottext">rnLHsTypeArg :: HsDocContext
-&gt; LHsTypeArg GhcPs -&gt; RnM (LHsTypeArg GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTypeArg"><span class="hs-identifier hs-var hs-var">rnLHsTypeArg</span></a></span></span><span> </span><span id="local-6989586621681129792"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129792"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsValArg"><span class="hs-identifier hs-type">HsValArg</span></a></span><span> </span><span id="local-6989586621681129790"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129790"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-511"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129789"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129789"><span class="hs-identifier hs-var">tys_rn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129788"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129788"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsType"><span class="hs-identifier hs-var">rnLHsType</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129792"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129790"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-512"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsTypeArg GhcRn, FreeVars) -&gt; RnM (LHsTypeArg GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsTypeArg GhcRn
forall tm ty. tm -&gt; HsArg tm ty
</span><a href="GHC.Hs.Type.html#HsValArg"><span class="hs-identifier hs-var">HsValArg</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129789"><span class="hs-identifier hs-var">tys_rn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129788"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-513"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypeArg"><span class="hs-identifier hs-var">rnLHsTypeArg</span></a></span><span> </span><span id="local-6989586621681129787"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129787"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsTypeArg"><span class="hs-identifier hs-type">HsTypeArg</span></a></span><span> </span><span id="local-6989586621681129785"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129785"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681129784"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129784"><span class="hs-identifier hs-var">ki</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129783"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129783"><span class="hs-identifier hs-var">kis_rn</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129782"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129782"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsKind"><span class="hs-identifier hs-var">rnLHsKind</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129787"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129784"><span class="hs-identifier hs-var">ki</span></a></span><span>
</span><span id="line-515"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsTypeArg GhcRn, FreeVars) -&gt; RnM (LHsTypeArg GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; LHsType GhcRn -&gt; LHsTypeArg GhcRn
forall tm ty. SrcSpan -&gt; ty -&gt; HsArg tm ty
</span><a href="GHC.Hs.Type.html#HsTypeArg"><span class="hs-identifier hs-var">HsTypeArg</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129785"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129783"><span class="hs-identifier hs-var">kis_rn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129782"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-516"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypeArg"><span class="hs-identifier hs-var">rnLHsTypeArg</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsArgPar"><span class="hs-identifier hs-type">HsArgPar</span></a></span><span> </span><span id="local-6989586621681129780"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129780"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-517"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTypeArg GhcRn, FreeVars) -&gt; RnM (LHsTypeArg GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; LHsTypeArg GhcRn
forall tm ty. SrcSpan -&gt; HsArg tm ty
</span><a href="GHC.Hs.Type.html#HsArgPar"><span class="hs-identifier hs-var">HsArgPar</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129780"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTypeArgs"><span class="hs-identifier hs-type">rnLHsTypeArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-520"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-521"></span><span id="rnLHsTypeArgs"><span class="annot"><span class="annottext">rnLHsTypeArgs :: HsDocContext
-&gt; [LHsTypeArg GhcPs] -&gt; RnM ([LHsTypeArg GhcRn], FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTypeArgs"><span class="hs-identifier hs-var hs-var">rnLHsTypeArgs</span></a></span></span><span> </span><span id="local-6989586621681129779"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129779"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129778"><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129778"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTypeArg GhcPs -&gt; RnM (LHsTypeArg GhcRn, FreeVars))
-&gt; [LHsTypeArg GhcPs] -&gt; RnM ([LHsTypeArg GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext
-&gt; LHsTypeArg GhcPs -&gt; RnM (LHsTypeArg GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTypeArg"><span class="hs-identifier hs-var">rnLHsTypeArg</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129779"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129778"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-522"></span><span>
</span><span id="line-523"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-524"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnTyKiContext"><span class="hs-identifier hs-type">rnTyKiContext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsContext"><span class="hs-identifier hs-type">LHsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-525"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsContext"><span class="hs-identifier hs-type">LHsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span id="rnTyKiContext"><span class="annot"><span class="annottext">rnTyKiContext :: RnTyKiEnv
-&gt; GenLocated SrcSpan (HsContext GhcPs)
-&gt; RnM (LHsContext GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnTyKiContext"><span class="hs-identifier hs-var hs-var">rnTyKiContext</span></a></span></span><span> </span><span id="local-6989586621681129776"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129776"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129775"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129775"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129774"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129774"><span class="hs-identifier hs-var">cxt</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-527"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rncontext&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129774"><span class="hs-identifier hs-var">cxt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129773"><span class="annot"><span class="annottext">env' :: RnTyKiEnv
</span><a href="#local-6989586621681129773"><span class="hs-identifier hs-var hs-var">env'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129776"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_what :: RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var">rtke_what</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-529"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129772"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129772"><span class="hs-identifier hs-var">cxt'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129771"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129771"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129773"><span class="hs-identifier hs-var">env'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129774"><span class="hs-identifier hs-var">cxt</span></a></span><span>
</span><span id="line-530"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsContext GhcRn, FreeVars) -&gt; RnM (LHsContext GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; [LHsType GhcRn] -&gt; LHsContext GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129775"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129772"><span class="hs-identifier hs-var">cxt'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129771"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-531"></span><span>
</span><span id="line-532"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnContext"><span class="hs-identifier hs-type">rnContext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsContext"><span class="hs-identifier hs-type">LHsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-533"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsContext"><span class="hs-identifier hs-type">LHsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-534"></span><span id="rnContext"><span class="annot"><span class="annottext">rnContext :: HsDocContext
-&gt; GenLocated SrcSpan (HsContext GhcPs)
-&gt; RnM (LHsContext GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnContext"><span class="hs-identifier hs-var hs-var">rnContext</span></a></span></span><span> </span><span id="local-6989586621681129770"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129770"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129769"><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681129769"><span class="hs-identifier hs-var">theta</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
-&gt; GenLocated SrcSpan (HsContext GhcPs)
-&gt; RnM (LHsContext GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnTyKiContext"><span class="hs-identifier hs-var">rnTyKiContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129770"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681129769"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-535"></span><span>
</span><span id="line-536"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-type">rnLHsTyKi</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-538"></span><span id="rnLHsTyKi"><span class="annot"><span class="annottext">rnLHsTyKi :: RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var hs-var">rnLHsTyKi</span></a></span></span><span> </span><span id="local-6989586621681129768"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129768"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129767"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129767"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129766"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129766"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129767"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-540"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129765"><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129765"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129764"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129764"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129768"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129766"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-541"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn, FreeVars) -&gt; RnM (LHsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsType GhcRn -&gt; LHsType GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129767"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129765"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129764"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-type">rnHsTyKi</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-544"></span><span>
</span><span id="line-545"></span><span id="rnHsTyKi"><span class="annot"><span class="annottext">rnHsTyKi :: RnTyKiEnv -&gt; HsType GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var hs-var">rnHsTyKi</span></a></span></span><span> </span><span id="local-6989586621681129763"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129763"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129762"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129762"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_tele :: forall pass. HsType pass -&gt; HsForAllTelescope pass
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129761"><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129761"><span class="hs-identifier hs-var">tele</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129760"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129760"><span class="hs-identifier hs-var">tau</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-546"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129763"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129762"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-547"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; HsForAllTelescope GhcPs
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; RnM (HsType GhcRn, FreeVars)
forall a.
HsDocContext
-&gt; HsForAllTelescope GhcPs
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindHsForAllTelescope"><span class="hs-identifier hs-var">bindHsForAllTelescope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129763"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129761"><span class="hs-identifier hs-var">tele</span></a></span><span> </span><span class="annot"><span class="annottext">((HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
 -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; RnM (HsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129758"><span class="annot"><span class="annottext">HsForAllTelescope GhcRn
</span><a href="#local-6989586621681129758"><span class="hs-identifier hs-var">tele'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-548"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129757"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129757"><span class="hs-identifier hs-var">tau'</span></a></span></span><span class="hs-special">,</span><span>  </span><span id="local-6989586621681129756"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129756"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129763"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129760"><span class="hs-identifier hs-var">tau</span></a></span><span>
</span><span id="line-549"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">HsForAllTy :: forall pass.
XForAllTy pass
-&gt; HsForAllTelescope pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_xforall :: XForAllTy GhcRn
</span><a href="GHC.Hs.Type.html#hst_xforall"><span class="hs-identifier hs-var">hst_xforall</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XForAllTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-550"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_tele :: HsForAllTelescope GhcRn
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcRn
</span><a href="#local-6989586621681129758"><span class="hs-identifier hs-var">tele'</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129757"><span class="hs-identifier hs-var">tau'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-551"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129756"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129755"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129755"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129754"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129754"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: forall pass. HsType pass -&gt; LHsContext pass
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129753"><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681129753"><span class="hs-identifier hs-var">lctxt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129752"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129752"><span class="hs-identifier hs-var">tau</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-554"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129755"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129754"><span class="hs-identifier hs-var">ty</span></a></span><span>  </span><span class="hs-comment">-- See Note [QualTy in kinds]</span><span>
</span><span id="line-555"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129751"><span class="annot"><span class="annottext">LHsContext GhcRn
</span><a href="#local-6989586621681129751"><span class="hs-identifier hs-var">ctxt'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129750"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129750"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
-&gt; GenLocated SrcSpan (HsContext GhcPs)
-&gt; RnM (LHsContext GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnTyKiContext"><span class="hs-identifier hs-var">rnTyKiContext</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129755"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681129753"><span class="hs-identifier hs-var">lctxt</span></a></span><span>
</span><span id="line-556"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129749"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129749"><span class="hs-identifier hs-var">tau'</span></a></span></span><span class="hs-special">,</span><span>  </span><span id="local-6989586621681129748"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129748"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129755"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129752"><span class="hs-identifier hs-var">tau</span></a></span><span>
</span><span id="line-557"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsQualTy :: forall pass.
XQualTy pass -&gt; LHsContext pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_xqual :: XQualTy GhcRn
</span><a href="GHC.Hs.Type.html#hst_xqual"><span class="hs-identifier hs-var">hst_xqual</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XQualTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: LHsContext GhcRn
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsContext GhcRn
</span><a href="#local-6989586621681129751"><span class="hs-identifier hs-var">ctxt'</span></a></span><span>
</span><span id="line-558"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: LHsType GhcRn
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129749"><span class="hs-identifier hs-var">tau'</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-559"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129750"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129748"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-560"></span><span>
</span><span id="line-561"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129747"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129747"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsTyVar"><span class="hs-identifier hs-type">HsTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XTyVar GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129745"><span class="annot"><span class="annottext">PromotionFlag
</span><a href="#local-6989586621681129745"><span class="hs-identifier hs-var">ip</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129744"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129744"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129743"><span class="annot"><span class="annottext">IdP GhcPs
</span><a href="#local-6989586621681129743"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-562"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129747"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; Bool
</span><a href="GHC.Types.Name.Reader.html#isRdrTyVar"><span class="hs-identifier hs-var">isRdrTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
IdP GhcPs
</span><a href="#local-6989586621681129743"><span class="hs-identifier hs-var">rdr_name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-563"></span><span>         </span><span class="annot"><span class="annottext">Extension -&gt; TcRn () -&gt; TcRn ()
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#unlessXOptM"><span class="hs-identifier hs-var">unlessXOptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#PolyKinds"><span class="hs-identifier hs-var">LangExt.PolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-564"></span><span>         </span><span class="annot"><span class="annottext">HsDocContext -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#withHsDocContext"><span class="hs-identifier hs-var">withHsDocContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129747"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; MsgDoc) -&gt; MsgDoc -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-565"></span><span>         </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unexpected kind variable&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
IdP GhcPs
</span><a href="#local-6989586621681129743"><span class="hs-identifier hs-var">rdr_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-566"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Perhaps you intended to use PolyKinds&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-567"></span><span>           </span><span class="hs-comment">-- Any type variable at the kind level is illegal without the use</span><span>
</span><span id="line-568"></span><span>           </span><span class="hs-comment">-- of PolyKinds (see #14710)</span><span>
</span><span id="line-569"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129737"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129737"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#rnTyVar"><span class="hs-identifier hs-var">rnTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129747"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
IdP GhcPs
</span><a href="#local-6989586621681129743"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-570"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTyVar GhcRn
-&gt; PromotionFlag -&gt; Located (IdP GhcRn) -&gt; HsType GhcRn
forall pass.
XTyVar pass -&gt; PromotionFlag -&gt; Located (IdP pass) -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsTyVar"><span class="hs-identifier hs-var">HsTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XTyVar GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">PromotionFlag
</span><a href="#local-6989586621681129745"><span class="hs-identifier hs-var">ip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129744"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129737"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#unitFV"><span class="hs-identifier hs-var">unitFV</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129737"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129734"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129734"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129733"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129733"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsOpTy"><span class="hs-identifier hs-type">HsOpTy</span></a></span><span> </span><span class="annot"><span class="annottext">XOpTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129731"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129731"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681129730"><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129730"><span class="hs-identifier hs-var">l_op</span></a></span></span><span> </span><span id="local-6989586621681129729"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129729"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan
-&gt; RnM (HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129730"><span class="hs-identifier hs-var">l_op</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(RnM (HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars))
-&gt; RnM (HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-574"></span><span>    </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129727"><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129727"><span class="hs-identifier hs-var">l_op'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129726"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129726"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
-&gt; HsType GhcPs
-&gt; GenLocated SrcSpan RdrName
-&gt; RnM (GenLocated SrcSpan Name, FreeVars)
forall a.
Outputable a =&gt;
RnTyKiEnv
-&gt; a
-&gt; GenLocated SrcSpan RdrName
-&gt; RnM (GenLocated SrcSpan Name, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyOp"><span class="hs-identifier hs-var">rnHsTyOp</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129734"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129733"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129730"><span class="hs-identifier hs-var">l_op</span></a></span><span>
</span><span id="line-575"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129724"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129724"><span class="hs-identifier hs-var">fix</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupTyFixityRn"><span class="hs-identifier hs-var">lookupTyFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129727"><span class="hs-identifier hs-var">l_op'</span></a></span><span>
</span><span id="line-576"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129723"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129723"><span class="hs-identifier hs-var">ty1'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129722"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129722"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129734"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129731"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-577"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129721"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129721"><span class="hs-identifier hs-var">ty2'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129720"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129720"><span class="hs-identifier hs-var">fvs3</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129734"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129729"><span class="hs-identifier hs-var">ty2</span></a></span><span>
</span><span id="line-578"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129719"><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129719"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var">mkHsOpTyRn</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681129717"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129717"><span class="hs-identifier hs-var">t1</span></a></span></span><span> </span><span id="local-6989586621681129716"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129716"><span class="hs-identifier hs-var">t2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">XOpTy GhcRn
-&gt; LHsType GhcRn
-&gt; Located (IdP GhcRn)
-&gt; LHsType GhcRn
-&gt; HsType GhcRn
forall pass.
XOpTy pass
-&gt; LHsType pass
-&gt; Located (IdP pass)
-&gt; LHsType pass
-&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsOpTy"><span class="hs-identifier hs-var">HsOpTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XOpTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129717"><span class="hs-identifier hs-var">t1</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (IdP GhcRn)
</span><a href="#local-6989586621681129727"><span class="hs-identifier hs-var">l_op'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129716"><span class="hs-identifier hs-var">t2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-579"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129727"><span class="hs-identifier hs-var">l_op'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129724"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129723"><span class="hs-identifier hs-var">ty1'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129721"><span class="hs-identifier hs-var">ty2'</span></a></span><span>
</span><span id="line-580"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129719"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FreeVars] -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFVs"><span class="hs-identifier hs-var">plusFVs</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129726"><span class="hs-identifier hs-var">fvs1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129722"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129720"><span class="hs-identifier hs-var">fvs3</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-581"></span><span>
</span><span id="line-582"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129714"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129714"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsParTy"><span class="hs-identifier hs-type">HsParTy</span></a></span><span> </span><span class="annot"><span class="annottext">XParTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129712"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129712"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-583"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129711"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129711"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129710"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129710"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129714"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129712"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-584"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XParTy GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass. XParTy pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsParTy"><span class="hs-identifier hs-var">HsParTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XParTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129711"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129710"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-585"></span><span>
</span><span id="line-586"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129709"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129709"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsBangTy"><span class="hs-identifier hs-type">HsBangTy</span></a></span><span> </span><span class="annot"><span class="annottext">XBangTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129707"><span class="annot"><span class="annottext">HsSrcBang
</span><a href="#local-6989586621681129707"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621681129706"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129706"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-587"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129705"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129705"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129704"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129704"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129709"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129706"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-588"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XBangTy GhcRn -&gt; HsSrcBang -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XBangTy pass -&gt; HsSrcBang -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsBangTy"><span class="hs-identifier hs-var">HsBangTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XBangTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">HsSrcBang
</span><a href="#local-6989586621681129707"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129705"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129704"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-589"></span><span>
</span><span id="line-590"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129703"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129703"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129702"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129702"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsRecTy"><span class="hs-identifier hs-type">HsRecTy</span></a></span><span> </span><span class="annot"><span class="annottext">XRecTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129700"><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681129700"><span class="hs-identifier hs-var">flds</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-591"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129699"><span class="annot"><span class="annottext">ctxt :: HsDocContext
</span><a href="#local-6989586621681129699"><span class="hs-identifier hs-var hs-var">ctxt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129703"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-592"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129698"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681129698"><span class="hs-identifier hs-var">fls</span></a></span></span><span>          </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
</span><a href="#local-6989586621681129697"><span class="hs-identifier hs-var">get_fields</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129699"><span class="hs-identifier hs-var">ctxt</span></a></span><span>
</span><span id="line-593"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129696"><span class="annot"><span class="annottext">[LConDeclField GhcRn]
</span><a href="#local-6989586621681129696"><span class="hs-identifier hs-var">flds'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129695"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129695"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; [FieldLabel]
-&gt; [LConDeclField GhcPs]
-&gt; RnM ([LConDeclField GhcRn], FreeVars)
</span><a href="GHC.Rename.HsType.html#rnConDeclFields"><span class="hs-identifier hs-var">rnConDeclFields</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129699"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681129698"><span class="hs-identifier hs-var">fls</span></a></span><span> </span><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681129700"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-594"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XRecTy GhcRn -&gt; [LConDeclField GhcRn] -&gt; HsType GhcRn
forall pass. XRecTy pass -&gt; [LConDeclField pass] -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsRecTy"><span class="hs-identifier hs-var">HsRecTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XRecTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">[LConDeclField GhcRn]
</span><a href="#local-6989586621681129696"><span class="hs-identifier hs-var">flds'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129695"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-595"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-596"></span><span>    </span><span id="local-6989586621681129697"><span class="annot"><span class="annottext">get_fields :: HsDocContext -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
</span><a href="#local-6989586621681129697"><span class="hs-identifier hs-var hs-var">get_fields</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.Utils.html#ConDeclCtx"><span class="hs-identifier hs-type">ConDeclCtx</span></a></span><span> </span><span id="local-6989586621681129693"><span class="annot"><span class="annottext">[GenLocated SrcSpan Name]
</span><a href="#local-6989586621681129693"><span class="hs-identifier hs-var">names</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan Name
 -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel])
-&gt; [GenLocated SrcSpan Name]
-&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m [b]) -&gt; [a] -&gt; m [b]
</span><a href="GHC.Utils.Monad.html#concatMapM"><span class="hs-identifier hs-var">concatMapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
</span><a href="GHC.Rename.Env.html#lookupConstructorFields"><span class="hs-identifier hs-var">lookupConstructorFields</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel])
-&gt; (GenLocated SrcSpan Name -&gt; Name)
-&gt; GenLocated SrcSpan Name
-&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan Name]
</span><a href="#local-6989586621681129693"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-598"></span><span>    </span><span class="annot"><a href="#local-6989586621681129697"><span class="hs-identifier hs-var">get_fields</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-599"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Record syntax is illegal here:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-600"></span><span>                                   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129702"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-601"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[FieldLabel] -&gt; IOEnv (Env TcGblEnv TcLclEnv) [FieldLabel]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-602"></span><span>
</span><span id="line-603"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129690"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129690"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-type">HsFunTy</span></a></span><span> </span><span id="local-6989586621681129688"><span class="annot"><span class="annottext">XFunTy GhcPs
</span><a href="#local-6989586621681129688"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621681129687"><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129687"><span class="hs-identifier hs-var">mult</span></a></span></span><span> </span><span id="local-6989586621681129686"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129686"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681129685"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129685"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-604"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129684"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129684"><span class="hs-identifier hs-var">ty1'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129683"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129683"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129690"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129686"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-605"></span><span>        </span><span class="hs-comment">-- Might find a for-all as the arg of a function type</span><span>
</span><span id="line-606"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129682"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129682"><span class="hs-identifier hs-var">ty2'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129681"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129681"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129690"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129685"><span class="hs-identifier hs-var">ty2</span></a></span><span>
</span><span id="line-607"></span><span>        </span><span class="hs-comment">-- Or as the result.  This happens when reading Prelude.hi</span><span>
</span><span id="line-608"></span><span>        </span><span class="hs-comment">-- when we find return :: forall m. Monad m -&gt; forall a. a -&gt; m a</span><span>
</span><span id="line-609"></span><span>
</span><span id="line-610"></span><span>        </span><span class="hs-comment">-- Check for fixity rearrangements</span><span>
</span><span id="line-611"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129680"><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129680"><span class="hs-identifier hs-var">mult'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129679"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129679"><span class="hs-identifier hs-var">w_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsArrow GhcPs -&gt; RnM (HsArrow GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-var">rnHsArrow</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129690"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129687"><span class="hs-identifier hs-var">mult</span></a></span><span>
</span><span id="line-612"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129678"><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129678"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var">mkHsOpTyRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsArrow GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129677"><span class="hs-identifier hs-var">hs_fun_ty</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129680"><span class="hs-identifier hs-var">mult'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Types.Prim.html#funTyConName"><span class="hs-identifier hs-var">funTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#funTyFixity"><span class="hs-identifier hs-var">funTyFixity</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129684"><span class="hs-identifier hs-var">ty1'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129682"><span class="hs-identifier hs-var">ty2'</span></a></span><span>
</span><span id="line-613"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129678"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129683"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129681"><span class="hs-identifier hs-var">fvs2</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129679"><span class="hs-identifier hs-var">w_fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-614"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-615"></span><span>    </span><span id="local-6989586621681129677"><span class="annot"><span class="annottext">hs_fun_ty :: HsArrow GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129677"><span class="hs-identifier hs-var hs-var">hs_fun_ty</span></a></span></span><span> </span><span id="local-6989586621681129676"><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129676"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621681129675"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129675"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621681129674"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129674"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XFunTy GhcRn
-&gt; HsArrow GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XFunTy pass
-&gt; HsArrow pass -&gt; LHsType pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-var">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">XFunTy GhcPs
XFunTy GhcRn
</span><a href="#local-6989586621681129688"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129676"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129675"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129674"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129673"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129673"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129672"><span class="annot"><span class="annottext">listTy :: HsType GhcPs
</span><a href="#local-6989586621681129672"><span class="hs-identifier hs-var">listTy</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsListTy"><span class="hs-identifier hs-type">HsListTy</span></a></span><span> </span><span class="annot"><span class="annottext">XListTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129670"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129670"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129669"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129669"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-619"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129669"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129673"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-620"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129673"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129672"><span class="hs-identifier hs-var">listTy</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-621"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129666"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129666"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129665"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129665"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129673"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129670"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-622"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XListTy GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass. XListTy pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsListTy"><span class="hs-identifier hs-var">HsListTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XListTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129666"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129665"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-623"></span><span>
</span><span id="line-624"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129664"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129664"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129663"><span class="annot"><span class="annottext">t :: HsType GhcPs
</span><a href="#local-6989586621681129663"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsKindSig"><span class="hs-identifier hs-type">HsKindSig</span></a></span><span> </span><span class="annot"><span class="annottext">XKindSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129661"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129661"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681129660"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129660"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-625"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129664"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129663"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-626"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129659"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129659"><span class="hs-identifier hs-var">kind_sigs_ok</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#KindSignatures"><span class="hs-identifier hs-var">LangExt.KindSignatures</span></a></span><span>
</span><span id="line-627"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129659"><span class="hs-identifier hs-var">kind_sigs_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#badKindSigErr"><span class="hs-identifier hs-var">badKindSigErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129664"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129661"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-628"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129656"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129656"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129655"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129655"><span class="hs-identifier hs-var">lhs_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129664"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129661"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-629"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129654"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129654"><span class="hs-identifier hs-var">k'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129653"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129653"><span class="hs-identifier hs-var">sig_fvs</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129664"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">rtke_level :: TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#KindLevel"><span class="hs-identifier hs-var">KindLevel</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129660"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-630"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XKindSig GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XKindSig pass -&gt; LHsType pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsKindSig"><span class="hs-identifier hs-var">HsKindSig</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XKindSig GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129656"><span class="hs-identifier hs-var">ty'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129654"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129655"><span class="hs-identifier hs-var">lhs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129653"><span class="hs-identifier hs-var">sig_fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span class="hs-comment">-- Unboxed tuples are allowed to have poly-typed arguments.  These</span><span>
</span><span id="line-633"></span><span class="hs-comment">-- sometimes crop up as a result of CPR worker-wrappering dictionaries.</span><span>
</span><span id="line-634"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129652"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129652"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129651"><span class="annot"><span class="annottext">tupleTy :: HsType GhcPs
</span><a href="#local-6989586621681129651"><span class="hs-identifier hs-var">tupleTy</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsTupleTy"><span class="hs-identifier hs-type">HsTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">XTupleTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129649"><span class="annot"><span class="annottext">HsTupleSort
</span><a href="#local-6989586621681129649"><span class="hs-identifier hs-var">tup_con</span></a></span></span><span> </span><span id="local-6989586621681129648"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129648"><span class="hs-identifier hs-var">tys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-635"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129647"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129647"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-636"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129647"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129652"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129652"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129651"><span class="hs-identifier hs-var">tupleTy</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-638"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129646"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129646"><span class="hs-identifier hs-var">tys'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129645"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129645"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129652"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129648"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-639"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTupleTy GhcRn -&gt; HsTupleSort -&gt; [LHsType GhcRn] -&gt; HsType GhcRn
forall pass.
XTupleTy pass -&gt; HsTupleSort -&gt; [LHsType pass] -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsTupleTy"><span class="hs-identifier hs-var">HsTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XTupleTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">HsTupleSort
</span><a href="#local-6989586621681129649"><span class="hs-identifier hs-var">tup_con</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129646"><span class="hs-identifier hs-var">tys'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129645"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-640"></span><span>
</span><span id="line-641"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129644"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129644"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129643"><span class="annot"><span class="annottext">sumTy :: HsType GhcPs
</span><a href="#local-6989586621681129643"><span class="hs-identifier hs-var">sumTy</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsSumTy"><span class="hs-identifier hs-type">HsSumTy</span></a></span><span> </span><span class="annot"><span class="annottext">XSumTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129641"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129641"><span class="hs-identifier hs-var">tys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-642"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129640"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129640"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-643"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129640"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129644"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-644"></span><span>              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129644"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129643"><span class="hs-identifier hs-var">sumTy</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-645"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129639"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129639"><span class="hs-identifier hs-var">tys'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129638"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129638"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129644"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129641"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-646"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XSumTy GhcRn -&gt; [LHsType GhcRn] -&gt; HsType GhcRn
forall pass. XSumTy pass -&gt; [LHsType pass] -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsSumTy"><span class="hs-identifier hs-var">HsSumTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XSumTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129639"><span class="hs-identifier hs-var">tys'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129638"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-647"></span><span>
</span><span id="line-648"></span><span class="hs-comment">-- Ensure that a type-level integer is nonnegative (#8306, #8412)</span><span>
</span><span id="line-649"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129637"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129637"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129636"><span class="annot"><span class="annottext">tyLit :: HsType GhcPs
</span><a href="#local-6989586621681129636"><span class="hs-identifier hs-var">tyLit</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsTyLit"><span class="hs-identifier hs-type">HsTyLit</span></a></span><span> </span><span class="annot"><span class="annottext">XTyLit GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129634"><span class="annot"><span class="annottext">HsTyLit
</span><a href="#local-6989586621681129634"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-650"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129633"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129633"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-651"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129633"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129637"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129636"><span class="hs-identifier hs-var">tyLit</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-652"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsTyLit -&gt; Bool
</span><a href="#local-6989586621681129632"><span class="hs-identifier hs-var">negLit</span></a></span><span> </span><span class="annot"><span class="annottext">HsTyLit
</span><a href="#local-6989586621681129634"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129631"><span class="hs-identifier hs-var">negLitErr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-653"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129637"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129636"><span class="hs-identifier hs-var">tyLit</span></a></span><span>
</span><span id="line-654"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XTyLit GhcRn -&gt; HsTyLit -&gt; HsType GhcRn
forall pass. XTyLit pass -&gt; HsTyLit -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsTyLit"><span class="hs-identifier hs-var">HsTyLit</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XTyLit GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">HsTyLit
</span><a href="#local-6989586621681129634"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-655"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-656"></span><span>    </span><span id="local-6989586621681129632"><span class="annot"><span class="annottext">negLit :: HsTyLit -&gt; Bool
</span><a href="#local-6989586621681129632"><span class="hs-identifier hs-var hs-var">negLit</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsStrTy"><span class="hs-identifier hs-type">HsStrTy</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-657"></span><span>    </span><span class="annot"><a href="#local-6989586621681129632"><span class="hs-identifier hs-var">negLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsNumTy"><span class="hs-identifier hs-type">HsNumTy</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129624"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681129624"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681129624"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>
</span><span id="line-658"></span><span>    </span><span id="local-6989586621681129631"><span class="annot"><span class="annottext">negLitErr :: MsgDoc
</span><a href="#local-6989586621681129631"><span class="hs-identifier hs-var hs-var">negLitErr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal literal in type (type literals must not be negative):&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129636"><span class="hs-identifier hs-var">tyLit</span></a></span><span>
</span><span id="line-659"></span><span>
</span><span id="line-660"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129622"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129622"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsAppTy"><span class="hs-identifier hs-type">HsAppTy</span></a></span><span> </span><span class="annot"><span class="annottext">XAppTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129620"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129620"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681129619"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129619"><span class="hs-identifier hs-var">ty2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-661"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129618"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129618"><span class="hs-identifier hs-var">ty1'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129617"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129617"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129622"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129620"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-662"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129616"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129616"><span class="hs-identifier hs-var">ty2'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129615"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129615"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129622"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129619"><span class="hs-identifier hs-var">ty2</span></a></span><span>
</span><span id="line-663"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XAppTy GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XAppTy pass -&gt; LHsType pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsAppTy"><span class="hs-identifier hs-var">HsAppTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XAppTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129618"><span class="hs-identifier hs-var">ty1'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129616"><span class="hs-identifier hs-var">ty2'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129617"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129615"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-664"></span><span>
</span><span id="line-665"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129614"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129614"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsAppKindTy"><span class="hs-identifier hs-type">HsAppKindTy</span></a></span><span> </span><span id="local-6989586621681129612"><span class="annot"><span class="annottext">XAppKindTy GhcPs
</span><a href="#local-6989586621681129612"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681129611"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129611"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681129610"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129610"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-666"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129609"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129609"><span class="hs-identifier hs-var">kind_app</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#TypeApplications"><span class="hs-identifier hs-var">LangExt.TypeApplications</span></a></span><span>
</span><span id="line-667"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129609"><span class="hs-identifier hs-var">kind_app</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; LHsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#typeAppErr"><span class="hs-identifier hs-var">typeAppErr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;kind&quot;</span></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129610"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-668"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129607"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129607"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129606"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129606"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129614"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129611"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-669"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129605"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129605"><span class="hs-identifier hs-var">k'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129604"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129604"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129614"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">{</span><span class="annot"><span class="annottext">rtke_level :: TypeOrKind
</span><a href="GHC.Rename.HsType.html#rtke_level"><span class="hs-identifier hs-var">rtke_level</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#KindLevel"><span class="hs-identifier hs-var">KindLevel</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129610"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-670"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XAppKindTy GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XAppKindTy pass -&gt; LHsType pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsAppKindTy"><span class="hs-identifier hs-var">HsAppKindTy</span></a></span><span> </span><span class="annot"><span class="annottext">XAppKindTy GhcPs
XAppKindTy GhcRn
</span><a href="#local-6989586621681129612"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129607"><span class="hs-identifier hs-var">ty'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129605"><span class="hs-identifier hs-var">k'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129606"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129604"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129603"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129603"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129602"><span class="annot"><span class="annottext">t :: HsType GhcPs
</span><a href="#local-6989586621681129602"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsIParamTy"><span class="hs-identifier hs-type">HsIParamTy</span></a></span><span> </span><span class="annot"><span class="annottext">XIParamTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129600"><span class="annot"><span class="annottext">Located HsIPName
</span><a href="#local-6989586621681129600"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681129599"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129599"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-673"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#notInKinds"><span class="hs-identifier hs-var">notInKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129603"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129602"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-674"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129597"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129597"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129596"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129596"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129603"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129599"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-675"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XIParamTy GhcRn
-&gt; Located HsIPName -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XIParamTy pass -&gt; Located HsIPName -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsIParamTy"><span class="hs-identifier hs-var">HsIParamTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XIParamTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">Located HsIPName
</span><a href="#local-6989586621681129600"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129597"><span class="hs-identifier hs-var">ty'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129596"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-676"></span><span>
</span><span id="line-677"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsStarTy"><span class="hs-identifier hs-type">HsStarTy</span></a></span><span> </span><span class="annot"><span class="annottext">XStarTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129594"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129594"><span class="hs-identifier hs-var">isUni</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-678"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XStarTy GhcRn -&gt; Bool -&gt; HsType GhcRn
forall pass. XStarTy pass -&gt; Bool -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsStarTy"><span class="hs-identifier hs-var">HsStarTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XStarTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129594"><span class="hs-identifier hs-var">isUni</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-679"></span><span>
</span><span id="line-680"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsSpliceTy"><span class="hs-identifier hs-type">HsSpliceTy</span></a></span><span> </span><span class="annot"><span class="annottext">XSpliceTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129592"><span class="annot"><span class="annottext">HsSplice GhcPs
</span><a href="#local-6989586621681129592"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-681"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsSplice GhcPs -&gt; RnM (HsType GhcRn, FreeVars)
</span><a href="GHC.Rename.Splice.html#rnSpliceType"><span class="hs-identifier hs-var">rnSpliceType</span></a></span><span> </span><span class="annot"><span class="annottext">HsSplice GhcPs
</span><a href="#local-6989586621681129592"><span class="hs-identifier hs-var">sp</span></a></span><span>
</span><span id="line-682"></span><span>
</span><span id="line-683"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129591"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129591"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129589"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129589"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681129588"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621681129588"><span class="hs-identifier hs-var">haddock_doc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-684"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129587"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129587"><span class="hs-identifier hs-var">ty'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129586"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129586"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129591"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129589"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-685"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129585"><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621681129585"><span class="hs-identifier hs-var">haddock_doc'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsDocString -&gt; RnM LHsDocString
</span><a href="GHC.Rename.Doc.html#rnLHsDoc"><span class="hs-identifier hs-var">rnLHsDoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621681129588"><span class="hs-identifier hs-var">haddock_doc</span></a></span><span>
</span><span id="line-686"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XDocTy GhcRn -&gt; LHsType GhcRn -&gt; LHsDocString -&gt; HsType GhcRn
forall pass.
XDocTy pass -&gt; LHsType pass -&gt; LHsDocString -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-var">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XDocTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129587"><span class="hs-identifier hs-var">ty'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><a href="#local-6989586621681129585"><span class="hs-identifier hs-var">haddock_doc'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129586"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-687"></span><span>
</span><span id="line-688"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#XHsType"><span class="hs-identifier hs-type">XHsType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#NHsCoreTy"><span class="hs-identifier hs-type">NHsCoreTy</span></a></span><span> </span><span id="local-6989586621681129582"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681129582"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-689"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XXType GhcRn -&gt; HsType GhcRn
forall pass. XXType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#XHsType"><span class="hs-identifier hs-var">XHsType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; NewHsTypeX
</span><a href="GHC.Hs.Type.html#NHsCoreTy"><span class="hs-identifier hs-var">NHsCoreTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681129582"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-690"></span><span>    </span><span class="hs-comment">-- The emptyFVs probably isn't quite right</span><span>
</span><span id="line-691"></span><span>    </span><span class="hs-comment">-- but I don't think it matters</span><span>
</span><span id="line-692"></span><span>
</span><span id="line-693"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129581"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129581"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129580"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129580"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitListTy"><span class="hs-identifier hs-type">HsExplicitListTy</span></a></span><span> </span><span class="annot"><span class="annottext">XExplicitListTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129578"><span class="annot"><span class="annottext">PromotionFlag
</span><a href="#local-6989586621681129578"><span class="hs-identifier hs-var">ip</span></a></span></span><span> </span><span id="local-6989586621681129577"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129577"><span class="hs-identifier hs-var">tys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-694"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129581"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129580"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-695"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129576"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129576"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-696"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129576"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129581"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129580"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-697"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129575"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129575"><span class="hs-identifier hs-var">tys'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129574"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129574"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129581"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129577"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-698"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XExplicitListTy GhcRn
-&gt; PromotionFlag -&gt; [LHsType GhcRn] -&gt; HsType GhcRn
forall pass.
XExplicitListTy pass
-&gt; PromotionFlag -&gt; [LHsType pass] -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsExplicitListTy"><span class="hs-identifier hs-var">HsExplicitListTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XExplicitListTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">PromotionFlag
</span><a href="#local-6989586621681129578"><span class="hs-identifier hs-var">ip</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129575"><span class="hs-identifier hs-var">tys'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129574"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-699"></span><span>
</span><span id="line-700"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129573"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129573"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129572"><span class="annot"><span class="annottext">ty :: HsType GhcPs
</span><a href="#local-6989586621681129572"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitTupleTy"><span class="hs-identifier hs-type">HsExplicitTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">XExplicitTupleTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129570"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129570"><span class="hs-identifier hs-var">tys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-701"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; TcRn ()
forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129573"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129572"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-702"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129569"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129569"><span class="hs-identifier hs-var">data_kinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#DataKinds"><span class="hs-identifier hs-var">LangExt.DataKinds</span></a></span><span>
</span><span id="line-703"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129569"><span class="hs-identifier hs-var">data_kinds</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var">dataKindsErr</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129573"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129572"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-704"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129568"><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129568"><span class="hs-identifier hs-var">tys'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129567"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129567"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars))
-&gt; HsContext GhcPs -&gt; RnM ([LHsType GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129573"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129570"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-705"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XExplicitTupleTy GhcRn -&gt; [LHsType GhcRn] -&gt; HsType GhcRn
forall pass. XExplicitTupleTy pass -&gt; [LHsType pass] -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsExplicitTupleTy"><span class="hs-identifier hs-var">HsExplicitTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XExplicitTupleTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsType GhcRn]
</span><a href="#local-6989586621681129568"><span class="hs-identifier hs-var">tys'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129567"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-706"></span><span>
</span><span id="line-707"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyKi"><span class="hs-identifier hs-var">rnHsTyKi</span></a></span><span> </span><span id="local-6989586621681129566"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129566"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsWildCardTy"><span class="hs-identifier hs-type">HsWildCardTy</span></a></span><span> </span><span class="annot"><span class="annottext">XWildCardTy GhcPs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-708"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkAnonWildCard"><span class="hs-identifier hs-var">checkAnonWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129566"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-709"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(HsType GhcRn, FreeVars) -&gt; RnM (HsType GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XWildCardTy GhcRn -&gt; HsType GhcRn
forall pass. XWildCardTy pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsWildCardTy"><span class="hs-identifier hs-var">HsWildCardTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XWildCardTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-type">rnHsArrow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsArrow"><span class="hs-identifier hs-type">HsArrow</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsArrow"><span class="hs-identifier hs-type">HsArrow</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-712"></span><span id="rnHsArrow"><span class="annot"><span class="annottext">rnHsArrow :: RnTyKiEnv -&gt; HsArrow GhcPs -&gt; RnM (HsArrow GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-var hs-var">rnHsArrow</span></a></span></span><span> </span><span id="local-6989586621681129564"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129564"><span class="hs-identifier hs-var">_env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsUnrestrictedArrow"><span class="hs-identifier hs-type">HsUnrestrictedArrow</span></a></span><span> </span><span id="local-6989586621681129562"><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129562"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsArrow GhcRn, FreeVars) -&gt; RnM (HsArrow GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsUnicodeSyntax -&gt; HsArrow GhcRn
forall pass. IsUnicodeSyntax -&gt; HsArrow pass
</span><a href="GHC.Hs.Type.html#HsUnrestrictedArrow"><span class="hs-identifier hs-var">HsUnrestrictedArrow</span></a></span><span> </span><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129562"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-713"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-var">rnHsArrow</span></a></span><span> </span><span id="local-6989586621681129561"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129561"><span class="hs-identifier hs-var">_env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsLinearArrow"><span class="hs-identifier hs-type">HsLinearArrow</span></a></span><span> </span><span id="local-6989586621681129559"><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129559"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsArrow GhcRn, FreeVars) -&gt; RnM (HsArrow GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsUnicodeSyntax -&gt; HsArrow GhcRn
forall pass. IsUnicodeSyntax -&gt; HsArrow pass
</span><a href="GHC.Hs.Type.html#HsLinearArrow"><span class="hs-identifier hs-var">HsLinearArrow</span></a></span><span> </span><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129559"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="GHC.Types.Name.Set.html#emptyFVs"><span class="hs-identifier hs-var">emptyFVs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-714"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnHsArrow"><span class="hs-identifier hs-var">rnHsArrow</span></a></span><span> </span><span id="local-6989586621681129558"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129558"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitMult"><span class="hs-identifier hs-type">HsExplicitMult</span></a></span><span> </span><span id="local-6989586621681129556"><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129556"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621681129555"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129555"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-715"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681129554"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129554"><span class="hs-identifier hs-var">mult</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129553"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129553"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IsUnicodeSyntax -&gt; LHsType GhcRn -&gt; HsArrow GhcRn
forall pass. IsUnicodeSyntax -&gt; LHsType pass -&gt; HsArrow pass
</span><a href="GHC.Hs.Type.html#HsExplicitMult"><span class="hs-identifier hs-var">HsExplicitMult</span></a></span><span> </span><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><a href="#local-6989586621681129556"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129554"><span class="hs-identifier hs-var">mult</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129553"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((LHsType GhcRn, FreeVars) -&gt; (HsArrow GhcRn, FreeVars))
-&gt; RnM (LHsType GhcRn, FreeVars) -&gt; RnM (HsArrow GhcRn, FreeVars)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129558"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129555"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-716"></span><span>
</span><span id="line-717"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-718"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnTyVar"><span class="hs-identifier hs-type">rnTyVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-719"></span><span id="rnTyVar"><span class="annot"><span class="annottext">rnTyVar :: RnTyKiEnv -&gt; RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#rnTyVar"><span class="hs-identifier hs-var hs-var">rnTyVar</span></a></span></span><span> </span><span id="local-6989586621681129551"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129551"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129550"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129550"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span>
</span><span id="line-720"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129549"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129549"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.Env.html#lookupTypeOccRn"><span class="hs-identifier hs-var">lookupTypeOccRn</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129550"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-721"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Name -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkNamedWildCard"><span class="hs-identifier hs-var">checkNamedWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129551"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129549"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-722"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129549"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-723"></span><span>
</span><span id="line-724"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnLTyVar"><span class="hs-identifier hs-type">rnLTyVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-725"></span><span class="hs-comment">-- Called externally; does not deal with wildcards</span><span>
</span><span id="line-726"></span><span id="rnLTyVar"><span class="annot"><span class="annottext">rnLTyVar :: GenLocated SrcSpan RdrName -&gt; RnM (GenLocated SrcSpan Name)
</span><a href="GHC.Rename.HsType.html#rnLTyVar"><span class="hs-identifier hs-var hs-var">rnLTyVar</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129546"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129546"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129545"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129545"><span class="hs-identifier hs-var">rdr_name</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-727"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129544"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129544"><span class="hs-identifier hs-var">tyvar</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.Env.html#lookupTypeOccRn"><span class="hs-identifier hs-var">lookupTypeOccRn</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129545"><span class="hs-identifier hs-var">rdr_name</span></a></span><span>
</span><span id="line-728"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; RnM (GenLocated SrcSpan Name)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129546"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129544"><span class="hs-identifier hs-var">tyvar</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-729"></span><span>
</span><span id="line-730"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-731"></span><span id="local-6989586621681130594"><span class="annot"><a href="GHC.Rename.HsType.html#rnHsTyOp"><span class="hs-identifier hs-type">rnHsTyOp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130594"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-732"></span><span>         </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681130594"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span>
</span><span id="line-733"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-734"></span><span id="rnHsTyOp"><span class="annot"><span class="annottext">rnHsTyOp :: forall a.
Outputable a =&gt;
RnTyKiEnv
-&gt; a
-&gt; GenLocated SrcSpan RdrName
-&gt; RnM (GenLocated SrcSpan Name, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnHsTyOp"><span class="hs-identifier hs-var hs-var">rnHsTyOp</span></a></span></span><span> </span><span id="local-6989586621681129534"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129534"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129533"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129533"><span class="hs-identifier hs-var">overall_ty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129532"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129532"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129531"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129531"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-735"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129530"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129530"><span class="hs-identifier hs-var">ops_ok</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#TypeOperators"><span class="hs-identifier hs-var">LangExt.TypeOperators</span></a></span><span>
</span><span id="line-736"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129528"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129528"><span class="hs-identifier hs-var">op'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#rnTyVar"><span class="hs-identifier hs-var">rnTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129534"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129531"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-737"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129530"><span class="hs-identifier hs-var">ops_ok</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129528"><span class="hs-identifier hs-var">op'</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Unique -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; Unique -&gt; Bool
</span><a href="GHC.Types.Unique.html#hasKey"><span class="hs-operator hs-var">`hasKey`</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#eqTyConKey"><span class="hs-identifier hs-var">eqTyConKey</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-738"></span><span>           </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; a -&gt; MsgDoc
forall a. Outputable a =&gt; RdrName -&gt; a -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#opTyErr"><span class="hs-identifier hs-var">opTyErr</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129531"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129533"><span class="hs-identifier hs-var">overall_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-739"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129523"><span class="annot"><span class="annottext">l_op' :: GenLocated SrcSpan Name
</span><a href="#local-6989586621681129523"><span class="hs-identifier hs-var hs-var">l_op'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129532"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129528"><span class="hs-identifier hs-var">op'</span></a></span><span>
</span><span id="line-740"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan Name, FreeVars)
-&gt; RnM (GenLocated SrcSpan Name, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129523"><span class="hs-identifier hs-var">l_op'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Name -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#unitFV"><span class="hs-identifier hs-var">unitFV</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129528"><span class="hs-identifier hs-var">op'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-741"></span><span>
</span><span id="line-742"></span><span class="hs-comment">--------------</span><span>
</span><span id="line-743"></span><span class="annot"><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-type">notAllowed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-744"></span><span id="notAllowed"><span class="annot"><span class="annottext">notAllowed :: MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-var hs-var">notAllowed</span></a></span></span><span> </span><span id="local-6989586621681129520"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129520"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-745"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Wildcard&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129520"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;not allowed&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-746"></span><span>
</span><span id="line-747"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-type">checkWildCard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-748"></span><span id="checkWildCard"><span class="annot"><span class="annottext">checkWildCard :: RnTyKiEnv -&gt; Maybe MsgDoc -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-var hs-var">checkWildCard</span></a></span></span><span> </span><span id="local-6989586621681129517"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129517"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681129516"><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129516"><span class="hs-identifier hs-var">doc</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-749"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129516"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#pprHsDocContext"><span class="hs-identifier hs-var">pprHsDocContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129517"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-750"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-var">checkWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-751"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-752"></span><span>
</span><span id="line-753"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkAnonWildCard"><span class="hs-identifier hs-type">checkAnonWildCard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-754"></span><span class="hs-comment">-- Report an error if an anonymous wildcard is illegal here</span><span>
</span><span id="line-755"></span><span id="checkAnonWildCard"><span class="annot"><span class="annottext">checkAnonWildCard :: RnTyKiEnv -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkAnonWildCard"><span class="hs-identifier hs-var hs-var">checkAnonWildCard</span></a></span></span><span> </span><span id="local-6989586621681129515"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129515"><span class="hs-identifier hs-var">env</span></a></span></span><span>
</span><span id="line-756"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Maybe MsgDoc -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-var">checkWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129515"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
</span><a href="#local-6989586621681129514"><span class="hs-identifier hs-var">mb_bad</span></a></span><span>
</span><span id="line-757"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-758"></span><span>    </span><span class="annot"><a href="#local-6989586621681129514"><span class="hs-identifier hs-type">mb_bad</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-759"></span><span>    </span><span id="local-6989586621681129514"><span class="annot"><span class="annottext">mb_bad :: Maybe MsgDoc
</span><a href="#local-6989586621681129514"><span class="hs-identifier hs-var hs-var">mb_bad</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#wildCardsAllowed"><span class="hs-identifier hs-var">wildCardsAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129515"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-760"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-var">notAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Hs.Type.html#pprAnonWildCard"><span class="hs-identifier hs-var">pprAnonWildCard</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-761"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-762"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var hs-var">rtke_what</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129515"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-763"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-764"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTopConstraint"><span class="hs-identifier hs-var">RnTopConstraint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129512"><span class="hs-identifier hs-var">constraint_msg</span></a></span><span>
</span><span id="line-765"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129512"><span class="hs-identifier hs-var">constraint_msg</span></a></span><span>
</span><span id="line-766"></span><span>
</span><span id="line-767"></span><span>    </span><span id="local-6989586621681129512"><span class="annot"><span class="annottext">constraint_msg :: MsgDoc
</span><a href="#local-6989586621681129512"><span class="hs-identifier hs-var hs-var">constraint_msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span>
</span><span id="line-768"></span><span>                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-var">notAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Hs.Type.html#pprAnonWildCard"><span class="hs-identifier hs-var">pprAnonWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in a constraint&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-769"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129511"><span class="hs-identifier hs-var">hint_msg</span></a></span><span>
</span><span id="line-770"></span><span>    </span><span id="local-6989586621681129511"><span class="annot"><span class="annottext">hint_msg :: MsgDoc
</span><a href="#local-6989586621681129511"><span class="hs-identifier hs-var hs-var">hint_msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;except as the last top-level constraint of a type signature&quot;</span></span><span>
</span><span id="line-771"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;e.g  f :: (Eq a, _) =&gt; blah&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-772"></span><span>
</span><span id="line-773"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkNamedWildCard"><span class="hs-identifier hs-type">checkNamedWildCard</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-774"></span><span class="hs-comment">-- Report an error if a named wildcard is illegal here</span><span>
</span><span id="line-775"></span><span id="checkNamedWildCard"><span class="annot"><span class="annottext">checkNamedWildCard :: RnTyKiEnv -&gt; Name -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkNamedWildCard"><span class="hs-identifier hs-var hs-var">checkNamedWildCard</span></a></span></span><span> </span><span id="local-6989586621681129510"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129510"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129509"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129509"><span class="hs-identifier hs-var">name</span></a></span></span><span>
</span><span id="line-776"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Maybe MsgDoc -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkWildCard"><span class="hs-identifier hs-var">checkWildCard</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129510"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
</span><a href="#local-6989586621681129508"><span class="hs-identifier hs-var">mb_bad</span></a></span><span>
</span><span id="line-777"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-778"></span><span>    </span><span id="local-6989586621681129508"><span class="annot"><span class="annottext">mb_bad :: Maybe MsgDoc
</span><a href="#local-6989586621681129508"><span class="hs-identifier hs-var hs-var">mb_bad</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129509"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; FreeVars -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-operator hs-var">`elemNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; FreeVars
</span><a href="GHC.Rename.HsType.html#rtke_nwcs"><span class="hs-identifier hs-var hs-var">rtke_nwcs</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129510"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-779"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-comment">-- Not a wildcard</span><span>
</span><span id="line-780"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#wildCardsAllowed"><span class="hs-identifier hs-var">wildCardsAllowed</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129510"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-781"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-var">notAllowed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129509"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-782"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-783"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#rtke_what"><span class="hs-identifier hs-var hs-var">rtke_what</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129510"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-784"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-comment">-- Allowed</span><span>
</span><span id="line-785"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTopConstraint"><span class="hs-identifier hs-var">RnTopConstraint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe MsgDoc
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>   </span><span class="hs-comment">-- Allowed; e.g.</span><span>
</span><span id="line-786"></span><span>                  </span><span class="hs-comment">-- f :: (Eq _a) =&gt; _a -&gt; Int</span><span>
</span><span id="line-787"></span><span>                  </span><span class="hs-comment">-- g :: (_a, _b) =&gt; T _a _b -&gt; Int</span><span>
</span><span id="line-788"></span><span>                  </span><span class="hs-comment">-- The named tyvars get filled in from elsewhere</span><span>
</span><span id="line-789"></span><span>               </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnConstraint"><span class="hs-identifier hs-var">RnConstraint</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Maybe MsgDoc
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129506"><span class="hs-identifier hs-var">constraint_msg</span></a></span><span>
</span><span id="line-790"></span><span>    </span><span id="local-6989586621681129506"><span class="annot"><span class="annottext">constraint_msg :: MsgDoc
</span><a href="#local-6989586621681129506"><span class="hs-identifier hs-var hs-var">constraint_msg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#notAllowed"><span class="hs-identifier hs-var">notAllowed</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129509"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in a constraint&quot;</span></span><span>
</span><span id="line-791"></span><span>
</span><span id="line-792"></span><span class="annot"><a href="GHC.Rename.HsType.html#wildCardsAllowed"><span class="hs-identifier hs-type">wildCardsAllowed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-793"></span><span class="hs-comment">-- ^ In what contexts are wildcards permitted</span><span>
</span><span id="line-794"></span><span id="wildCardsAllowed"><span class="annot"><span class="annottext">wildCardsAllowed :: RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#wildCardsAllowed"><span class="hs-identifier hs-var hs-var">wildCardsAllowed</span></a></span></span><span> </span><span id="local-6989586621681129505"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129505"><span class="hs-identifier hs-var">env</span></a></span></span><span>
</span><span id="line-795"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; HsDocContext
</span><a href="GHC.Rename.HsType.html#rtke_ctxt"><span class="hs-identifier hs-var hs-var">rtke_ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129505"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-796"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#TypeSigCtx"><span class="hs-identifier hs-type">TypeSigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-797"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#TypBrCtx"><span class="hs-identifier hs-type">TypBrCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>   </span><span class="hs-comment">-- Template Haskell quoted type</span><span>
</span><span id="line-798"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#SpliceTypeCtx"><span class="hs-identifier hs-type">SpliceTypeCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>   </span><span class="hs-comment">-- Result of a Template Haskell splice</span><span>
</span><span id="line-799"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#ExprWithTySigCtx"><span class="hs-identifier hs-type">ExprWithTySigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-800"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#PatCtx"><span class="hs-identifier hs-type">PatCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-801"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#RuleCtx"><span class="hs-identifier hs-type">RuleCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-802"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#FamPatCtx"><span class="hs-identifier hs-type">FamPatCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>   </span><span class="hs-comment">-- Not named wildcards though</span><span>
</span><span id="line-803"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#GHCiCtx"><span class="hs-identifier hs-type">GHCiCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-804"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#HsTypeCtx"><span class="hs-identifier hs-type">HsTypeCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-805"></span><span>       </span><span class="annot"><a href="GHC.Rename.Utils.html#StandaloneKindSigCtx"><span class="hs-identifier hs-type">StandaloneKindSigCtx</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-comment">-- See Note [Wildcards in standalone kind signatures] in &quot;GHC.Hs.Decls&quot;</span><span>
</span><span id="line-806"></span><span>       </span><span class="annot"><span class="annottext">HsDocContext
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-807"></span><span>
</span><span id="line-808"></span><span>
</span><span id="line-809"></span><span>
</span><span id="line-810"></span><span class="hs-comment">---------------</span><span>
</span><span id="line-811"></span><span class="hs-comment">-- | Ensures either that we're in a type or that -XPolyKinds is set</span><span>
</span><span id="line-812"></span><span id="local-6989586621681130604"><span class="annot"><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-type">checkPolyKinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130604"><span class="hs-identifier hs-type">ty</span></a></span><span>
</span><span id="line-813"></span><span>                </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span>
</span><span id="line-814"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681130604"><span class="hs-identifier hs-type">ty</span></a></span><span>      </span><span class="hs-comment">-- ^ type</span><span>
</span><span id="line-815"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-816"></span><span id="checkPolyKinds"><span class="annot"><span class="annottext">checkPolyKinds :: forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var hs-var">checkPolyKinds</span></a></span></span><span> </span><span id="local-6989586621681129492"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129492"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129491"><span class="annot"><span class="annottext">ty
</span><a href="#local-6989586621681129491"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-817"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129492"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-818"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129490"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129490"><span class="hs-identifier hs-var">polykinds</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#PolyKinds"><span class="hs-identifier hs-var">LangExt.PolyKinds</span></a></span><span>
</span><span id="line-819"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129490"><span class="hs-identifier hs-var">polykinds</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-820"></span><span>         </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal kind:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ty -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ty
</span><a href="#local-6989586621681129491"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-821"></span><span>                 </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Did you mean to enable PolyKinds?&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-822"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkPolyKinds"><span class="hs-identifier hs-var">checkPolyKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ty
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-823"></span><span>
</span><span id="line-824"></span><span id="local-6989586621681129488"><span class="annot"><a href="GHC.Rename.HsType.html#notInKinds"><span class="hs-identifier hs-type">notInKinds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681129488"><span class="hs-identifier hs-type">ty</span></a></span><span>
</span><span id="line-825"></span><span>           </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span>
</span><span id="line-826"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681129488"><span class="hs-identifier hs-type">ty</span></a></span><span>
</span><span id="line-827"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-828"></span><span id="notInKinds"><span class="annot"><span class="annottext">notInKinds :: forall ty. Outputable ty =&gt; RnTyKiEnv -&gt; ty -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#notInKinds"><span class="hs-identifier hs-var hs-var">notInKinds</span></a></span></span><span> </span><span id="local-6989586621681129484"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129484"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129483"><span class="annot"><span class="annottext">ty
</span><a href="#local-6989586621681129483"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-829"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129484"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-830"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal kind:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ty -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ty
</span><a href="#local-6989586621681129483"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-831"></span><span class="annot"><a href="GHC.Rename.HsType.html#notInKinds"><span class="hs-identifier hs-var">notInKinds</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ty
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-832"></span><span>
</span><span id="line-833"></span><span class="hs-comment">{- *****************************************************
*                                                      *
          Binding type variables
*                                                      *
***************************************************** -}</span><span>
</span><span id="line-838"></span><span>
</span><span id="line-839"></span><span id="local-6989586621681129482"><span class="annot"><a href="GHC.Rename.HsType.html#bindSigTyVarsFV"><span class="hs-identifier hs-type">bindSigTyVarsFV</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-840"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681129482"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-841"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681129482"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-842"></span><span class="hs-comment">-- Used just before renaming the defn of a function</span><span>
</span><span id="line-843"></span><span class="hs-comment">-- with a separate type signature, to bring its tyvars into scope</span><span>
</span><span id="line-844"></span><span class="hs-comment">-- With no -XScopedTypeVariables, this is a no-op</span><span>
</span><span id="line-845"></span><span id="bindSigTyVarsFV"><span class="annot"><span class="annottext">bindSigTyVarsFV :: forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindSigTyVarsFV"><span class="hs-identifier hs-var hs-var">bindSigTyVarsFV</span></a></span></span><span> </span><span id="local-6989586621681129480"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129480"><span class="hs-identifier hs-var">tvs</span></a></span></span><span> </span><span id="local-6989586621681129479"><span class="annot"><span class="annottext">RnM (a, FreeVars)
</span><a href="#local-6989586621681129479"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-846"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129478"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129478"><span class="hs-identifier hs-var">scoped_tyvars</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#ScopedTypeVariables"><span class="hs-identifier hs-var">LangExt.ScopedTypeVariables</span></a></span><span>
</span><span id="line-847"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129478"><span class="hs-identifier hs-var">scoped_tyvars</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-848"></span><span>                </span><span class="annot"><span class="annottext">RnM (a, FreeVars)
</span><a href="#local-6989586621681129479"><span class="hs-identifier hs-var">thing_inside</span></a></span><span>
</span><span id="line-849"></span><span>          </span><span class="hs-keyword">else</span><span>
</span><span id="line-850"></span><span>                </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier hs-var">bindLocalNamesFV</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129480"><span class="hs-identifier hs-var">tvs</span></a></span><span> </span><span class="annot"><span class="annottext">RnM (a, FreeVars)
</span><a href="#local-6989586621681129479"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-851"></span><span>
</span><span id="line-852"></span><span class="hs-comment">---------------</span><span>
</span><span id="line-853"></span><span class="annot"><a href="GHC.Rename.HsType.html#bindHsQTyVars"><span class="hs-identifier hs-type">bindHsQTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681130545"><span class="annot"><a href="#local-6989586621681130545"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span id="local-6989586621681130543"><span class="annot"><a href="#local-6989586621681130543"><span class="hs-identifier hs-type">b</span></a></span></span><span class="hs-operator">.</span><span>
</span><span id="line-854"></span><span>                 </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-855"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130545"><span class="hs-identifier hs-type">a</span></a></span><span>            </span><span class="hs-comment">-- Just _  =&gt; an associated type decl</span><span>
</span><span id="line-856"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>       </span><span class="hs-comment">-- Kind variables from scope</span><span>
</span><span id="line-857"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsQTyVars"><span class="hs-identifier hs-type">LHsQTyVars</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-858"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsQTyVars"><span class="hs-identifier hs-type">LHsQTyVars</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130543"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-859"></span><span>                  </span><span class="hs-comment">-- The Bool is True &lt;=&gt; all kind variables used in the</span><span>
</span><span id="line-860"></span><span>                  </span><span class="hs-comment">-- kind signature are bound on the left.  Reason:</span><span>
</span><span id="line-861"></span><span>                  </span><span class="hs-comment">-- the last clause of Note [CUSKs: Complete user-supplied</span><span>
</span><span id="line-862"></span><span>                  </span><span class="hs-comment">-- kind signatures] in GHC.Hs.Decls</span><span>
</span><span id="line-863"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130543"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-864"></span><span>
</span><span id="line-865"></span><span class="hs-comment">-- See Note [bindHsQTyVars examples]</span><span>
</span><span id="line-866"></span><span class="hs-comment">-- (a) Bring kind variables into scope</span><span>
</span><span id="line-867"></span><span class="hs-comment">--     both (i)  passed in body_kv_occs</span><span>
</span><span id="line-868"></span><span class="hs-comment">--     and  (ii) mentioned in the kinds of hsq_bndrs</span><span>
</span><span id="line-869"></span><span class="hs-comment">-- (b) Bring type variables into scope</span><span>
</span><span id="line-870"></span><span class="hs-comment">--</span><span>
</span><span id="line-871"></span><span id="bindHsQTyVars"><span class="annot"><span class="annottext">bindHsQTyVars :: forall a b.
HsDocContext
-&gt; Maybe a
-&gt; FreeKiTyVars
-&gt; LHsQTyVars GhcPs
-&gt; (LHsQTyVars GhcRn -&gt; Bool -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindHsQTyVars"><span class="hs-identifier hs-var hs-var">bindHsQTyVars</span></a></span></span><span> </span><span id="local-6989586621681129454"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129454"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129453"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129453"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span id="local-6989586621681129452"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129452"><span class="hs-identifier hs-var">body_kv_occs</span></a></span></span><span> </span><span id="local-6989586621681129451"><span class="annot"><span class="annottext">LHsQTyVars GhcPs
</span><a href="#local-6989586621681129451"><span class="hs-identifier hs-var">hsq_bndrs</span></a></span></span><span> </span><span id="local-6989586621681129450"><span class="annot"><span class="annottext">LHsQTyVars GhcRn -&gt; Bool -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129450"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-872"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129449"><span class="annot"><span class="annottext">bndr_kv_occs :: FreeKiTyVars
</span><a href="#local-6989586621681129449"><span class="hs-identifier hs-var hs-var">bndr_kv_occs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs] -&gt; FreeKiTyVars
forall flag. [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyVarBndrsKVs"><span class="hs-identifier hs-var">extractHsTyVarBndrsKVs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var">hs_tv_bndrs</span></a></span><span>
</span><span id="line-873"></span><span>
</span><span id="line-874"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-comment">-- See Note [bindHsQTyVars examples] for what</span><span>
</span><span id="line-875"></span><span>             </span><span class="hs-comment">-- all these various things are doing</span><span>
</span><span id="line-876"></span><span>             </span><span class="annot"><a href="#local-6989586621681129446"><span class="hs-identifier hs-type">bndrs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681129445"><span class="hs-identifier hs-type">implicit_kvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-877"></span><span>             </span><span id="local-6989586621681129446"><span class="annot"><span class="annottext">bndrs :: FreeKiTyVars
</span><a href="#local-6989586621681129446"><span class="hs-identifier hs-var hs-var">bndrs</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTyVarBndr () GhcPs -&gt; GenLocated SrcSpan RdrName)
-&gt; [LHsTyVarBndr () GhcPs] -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr () GhcPs -&gt; GenLocated SrcSpan RdrName
forall flag (p :: Pass).
LHsTyVarBndr flag (GhcPass p) -&gt; Located (IdP (GhcPass p))
</span><a href="GHC.Hs.Type.html#hsLTyVarLocName"><span class="hs-identifier hs-var">hsLTyVarLocName</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var">hs_tv_bndrs</span></a></span><span>
</span><span id="line-878"></span><span>             </span><span id="local-6989586621681129445"><span class="annot"><span class="annottext">implicit_kvs :: FreeKiTyVars
</span><a href="#local-6989586621681129445"><span class="hs-identifier hs-var hs-var">implicit_kvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-var">filterFreeVarsToBind</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129446"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-879"></span><span>               </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129449"><span class="hs-identifier hs-var">bndr_kv_occs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129452"><span class="hs-identifier hs-var">body_kv_occs</span></a></span><span>
</span><span id="line-880"></span><span>             </span><span id="local-6989586621681129442"><span class="annot"><span class="annottext">body_remaining :: FreeKiTyVars
</span><a href="#local-6989586621681129442"><span class="hs-identifier hs-var hs-var">body_remaining</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-var">filterFreeVarsToBind</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129449"><span class="hs-identifier hs-var">bndr_kv_occs</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-881"></span><span>              </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-var">filterFreeVarsToBind</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129446"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129452"><span class="hs-identifier hs-var">body_kv_occs</span></a></span><span>
</span><span id="line-882"></span><span>             </span><span id="local-6989586621681129441"><span class="annot"><span class="annottext">all_bound_on_lhs :: Bool
</span><a href="#local-6989586621681129441"><span class="hs-identifier hs-var hs-var">all_bound_on_lhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129442"><span class="hs-identifier hs-var">body_remaining</span></a></span><span>
</span><span id="line-883"></span><span>
</span><span id="line-884"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;checkMixedVars3&quot;</span></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-885"></span><span>           </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bndrs&quot;</span></span><span>   </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs] -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var">hs_tv_bndrs</span></a></span><span>
</span><span id="line-886"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bndr_kv_occs&quot;</span></span><span>   </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129449"><span class="hs-identifier hs-var">bndr_kv_occs</span></a></span><span>
</span><span id="line-887"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;body_kv_occs&quot;</span></span><span>   </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129452"><span class="hs-identifier hs-var">body_kv_occs</span></a></span><span>
</span><span id="line-888"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;implicit_kvs&quot;</span></span><span>   </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129445"><span class="hs-identifier hs-var">implicit_kvs</span></a></span><span>
</span><span id="line-889"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;body_remaining&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129442"><span class="hs-identifier hs-var">body_remaining</span></a></span><span>
</span><span id="line-890"></span><span>                </span><span class="hs-special">]</span><span>
</span><span id="line-891"></span><span>
</span><span id="line-892"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe a
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall assoc a.
Maybe assoc
-&gt; FreeKiTyVars
-&gt; ([Name] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnImplicitBndrs"><span class="hs-identifier hs-var">rnImplicitBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129453"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129445"><span class="hs-identifier hs-var">implicit_kvs</span></a></span><span> </span><span class="annot"><span class="annottext">(([Name] -&gt; RnM (b, FreeVars)) -&gt; RnM (b, FreeVars))
-&gt; ([Name] -&gt; RnM (b, FreeVars)) -&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129440"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129440"><span class="hs-identifier hs-var">implicit_kv_nms'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-893"></span><span>         </span><span class="annot"><span class="annottext">HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe a
-&gt; [LHsTyVarBndr () GhcPs]
-&gt; ([LHsTyVarBndr () GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall flag a b.
OutputableBndrFlag flag =&gt;
HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe a
-&gt; [LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier hs-var">bindLHsTyVarBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129454"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#NoWarnUnusedForalls"><span class="hs-identifier hs-var">NoWarnUnusedForalls</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129453"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var">hs_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(([LHsTyVarBndr () GhcRn] -&gt; RnM (b, FreeVars))
 -&gt; RnM (b, FreeVars))
-&gt; ([LHsTyVarBndr () GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129438"><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn]
</span><a href="#local-6989586621681129438"><span class="hs-identifier hs-var">rn_bndrs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-894"></span><span>           </span><span class="hs-comment">-- This is the only call site for bindLHsTyVarBndrs where we pass</span><span>
</span><span id="line-895"></span><span>           </span><span class="hs-comment">-- NoWarnUnusedForalls, which suppresses -Wunused-foralls warnings.</span><span>
</span><span id="line-896"></span><span>           </span><span class="hs-comment">-- See Note [Suppress -Wunused-foralls when binding LHsQTyVars].</span><span>
</span><span id="line-897"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-comment">-- The SrcSpan that rnImplicitBndrs will attach to each Name will</span><span>
</span><span id="line-898"></span><span>             </span><span class="hs-comment">-- span the entire declaration to which the LHsQTyVars belongs,</span><span>
</span><span id="line-899"></span><span>             </span><span class="hs-comment">-- which will be reflected in warning and error messages. We can</span><span>
</span><span id="line-900"></span><span>             </span><span class="hs-comment">-- be a little more precise than that by pointing to the location</span><span>
</span><span id="line-901"></span><span>             </span><span class="hs-comment">-- of the LHsQTyVars instead, which is what bndrs_loc</span><span>
</span><span id="line-902"></span><span>             </span><span class="hs-comment">-- corresponds to.</span><span>
</span><span id="line-903"></span><span>             </span><span id="local-6989586621681129437"><span class="annot"><span class="annottext">implicit_kv_nms :: [Name]
</span><a href="#local-6989586621681129437"><span class="hs-identifier hs-var hs-var">implicit_kv_nms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name) -&gt; [Name] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SrcSpan -&gt; Name
</span><a href="GHC.Types.Name.html#setNameLoc"><span class="hs-operator hs-var">`setNameLoc`</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129435"><span class="hs-identifier hs-var">bndrs_loc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129440"><span class="hs-identifier hs-var">implicit_kv_nms'</span></a></span><span>
</span><span id="line-904"></span><span>
</span><span id="line-905"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#traceRn"><span class="hs-identifier hs-var">traceRn</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bindHsQTyVars&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsQTyVars GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsQTyVars GhcPs
</span><a href="#local-6989586621681129451"><span class="hs-identifier hs-var">hsq_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681129437"><span class="hs-identifier hs-var">implicit_kv_nms</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn] -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn]
</span><a href="#local-6989586621681129438"><span class="hs-identifier hs-var">rn_bndrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-906"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsQTyVars GhcRn -&gt; Bool -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129450"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsQTvs :: forall pass.
XHsQTvs pass -&gt; [LHsTyVarBndr () pass] -&gt; LHsQTyVars pass
</span><a href="GHC.Hs.Type.html#HsQTvs"><span class="hs-identifier hs-type">HsQTvs</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsq_ext :: XHsQTvs GhcRn
</span><a href="GHC.Hs.Type.html#hsq_ext"><span class="hs-identifier hs-var">hsq_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name]
XHsQTvs GhcRn
</span><a href="#local-6989586621681129437"><span class="hs-identifier hs-var">implicit_kv_nms</span></a></span><span>
</span><span id="line-907"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hsq_explicit :: [LHsTyVarBndr () GhcRn]
</span><a href="GHC.Hs.Type.html#hsq_explicit"><span class="hs-identifier hs-var">hsq_explicit</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn]
</span><a href="#local-6989586621681129438"><span class="hs-identifier hs-var">rn_bndrs</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-908"></span><span>                      </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129441"><span class="hs-identifier hs-var">all_bound_on_lhs</span></a></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-909"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-910"></span><span>    </span><span id="local-6989586621681129447"><span class="annot"><span class="annottext">hs_tv_bndrs :: [LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var hs-var">hs_tv_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsQTyVars GhcPs -&gt; [LHsTyVarBndr () GhcPs]
forall pass. LHsQTyVars pass -&gt; [LHsTyVarBndr () pass]
</span><a href="GHC.Hs.Type.html#hsQTvExplicit"><span class="hs-identifier hs-var">hsQTvExplicit</span></a></span><span> </span><span class="annot"><span class="annottext">LHsQTyVars GhcPs
</span><a href="#local-6989586621681129451"><span class="hs-identifier hs-var">hsq_bndrs</span></a></span><span>
</span><span id="line-911"></span><span>
</span><span id="line-912"></span><span>    </span><span class="hs-comment">-- The SrcSpan of the LHsQTyVars. For example, bndrs_loc would be the</span><span>
</span><span id="line-913"></span><span>    </span><span class="hs-comment">-- highlighted part in the class below:</span><span>
</span><span id="line-914"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-915"></span><span>    </span><span class="hs-comment">--   class C (a :: j) (b :: k) where</span><span>
</span><span id="line-916"></span><span>    </span><span class="hs-comment">--            ^^^^^^^^^^^^^^^</span><span>
</span><span id="line-917"></span><span>    </span><span id="local-6989586621681129435"><span class="annot"><span class="annottext">bndrs_loc :: SrcSpan
</span><a href="#local-6989586621681129435"><span class="hs-identifier hs-var hs-var">bndrs_loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(LHsTyVarBndr () GhcPs -&gt; SrcSpan)
-&gt; [LHsTyVarBndr () GhcPs] -&gt; [SrcSpan]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr () GhcPs -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129447"><span class="hs-identifier hs-var">hs_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[SrcSpan] -&gt; [SrcSpan] -&gt; [SrcSpan]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; SrcSpan)
-&gt; FreeKiTyVars -&gt; [SrcSpan]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129452"><span class="hs-identifier hs-var">body_kv_occs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-918"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SrcSpan
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bindHsQTyVars.bndrs_loc&quot;</span></span><span>
</span><span id="line-919"></span><span>      </span><span class="hs-special">[</span><span id="local-6989586621681129429"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129429"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129429"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-920"></span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681129428"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129428"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681129427"><span class="annot"><span class="annottext">[SrcSpan]
</span><a href="#local-6989586621681129427"><span class="hs-identifier hs-var">locs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129428"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; SrcSpan -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#combineSrcSpans"><span class="hs-operator hs-var">`combineSrcSpans`</span></a></span><span> </span><span class="annot"><span class="annottext">[SrcSpan] -&gt; SrcSpan
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#last"><span class="hs-identifier hs-var">last</span></a></span><span> </span><span class="annot"><span class="annottext">[SrcSpan]
</span><a href="#local-6989586621681129427"><span class="hs-identifier hs-var">locs</span></a></span><span>
</span><span id="line-921"></span><span>
</span><span id="line-922"></span><span class="hs-comment">{- Note [bindHsQTyVars examples]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppose we have
   data T k (a::k1) (b::k) :: k2 -&gt; k1 -&gt; *

Then:
  hs_tv_bndrs = [k, a::k1, b::k], the explicitly-bound variables
  bndrs       = [k,a,b]

  bndr_kv_occs = [k,k1], kind variables free in kind signatures
                         of hs_tv_bndrs

  body_kv_occs = [k2,k1], kind variables free in the
                          result kind signature

  implicit_kvs = [k1,k2,k1], kind variables free in kind signatures
                             of hs_tv_bndrs, and not bound by bndrs

* We want to quantify add implicit bindings for implicit_kvs

* If body_kv_occs is non-empty, then there is a kind variable
  mentioned in the kind signature that is not bound &quot;on the left&quot;.
  That's one of the rules for a CUSK, so we pass that info on
  as the second argument to thing_inside.

* Order is not important in these lists.  All we are doing is
  bring Names into scope.

* bndr_kv_occs, body_kv_occs, and implicit_kvs can contain duplicates. All
  duplicate occurrences are removed when we bind them with rnImplicitBndrs.

Finally, you may wonder why filterFreeVarsToBind removes in-scope variables
from bndr/body_kv_occs.  How can anything be in scope?  Answer:
HsQTyVars is /also/ used (slightly oddly) for Haskell-98 syntax
ConDecls
   data T a = forall (b::k). MkT a b
The ConDecl has a LHsQTyVars in it; but 'a' scopes over the entire
ConDecl.  Hence the local RdrEnv may be non-empty and we must filter
out 'a' from the free vars.  (Mind you, in this situation all the
implicit kind variables are bound at the data type level, so there
are none to bind in the ConDecl, so there are no implicitly bound
variables at all.

Note [Kind variable scoping]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have
  data T (a :: k) k = ...
we report &quot;k is out of scope&quot; for (a::k).  Reason: k is not brought
into scope until the explicit k-binding that follows.  It would be
terribly confusing to bring into scope an /implicit/ k for a's kind
and a distinct, shadowing explicit k that follows, something like
  data T {k1} (a :: k1) k = ...

So the rule is:

   the implicit binders never include any
   of the explicit binders in the group

Note that in the denerate case
  data T (a :: a) = blah
we get a complaint the second 'a' is not in scope.

That applies to foralls too: e.g.
   forall (a :: k) k . blah

But if the foralls are split, we treat the two groups separately:
   forall (a :: k). forall k. blah
Here we bring into scope an implicit k, which is later shadowed
by the explicit k.

In implementation terms

* In bindHsQTyVars 'k' is free in bndr_kv_occs; then we delete
  the binders {a,k}, and so end with no implicit binders.  Then we
  rename the binders left-to-right, and hence see that 'k' is out of
  scope in the kind of 'a'.

* Similarly in extract_hs_tv_bndrs

Note [Variables used as both types and kinds]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We bind the type variables tvs, and kvs is the set of free variables of the
kinds in the scope of the binding. Here is one typical example:

   forall a b. a -&gt; (b::k) -&gt; (c::a)

Here, tvs will be {a,b}, and kvs {k,a}.

We must make sure that kvs includes all of variables in the kinds of type
variable bindings. For instance:

   forall k (a :: k). Proxy a

If we only look in the body of the `forall` type, we will mistakenly conclude
that kvs is {}. But in fact, the type variable `k` is also used as a kind
variable in (a :: k), later in the binding. (This mistake lead to #14710.)
So tvs is {k,a} and kvs is {k}.

NB: we do this only at the binding site of 'tvs'.

Note [Suppress -Wunused-foralls when binding LHsQTyVars]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The WarnUnusedForalls flag controls whether bindLHsTyVarBndrs should warn about
explicit type variable binders that go unused (e.g., the `a` in
`forall a. Int`). We almost always want to warn about these, since unused type
variables can usually be deleted without any repercussions. There is one
exception to this rule, however: binding LHsQTyVars. Consider this example:

  data Proxy a = Proxy

The `a` in `Proxy a` is bound by an LHsQTyVars, and the code which brings it
into scope, bindHsQTyVars, will invoke bindLHsTyVarBndrs in turn. As such, it
has a choice to make about whether to emit -Wunused-foralls warnings or not.
If it /did/ emit warnings, then the `a` would be flagged as unused. However,
this is not what we want! Removing the `a` in `Proxy a` would change its kind
entirely, which is a huge price to pay for fixing a warning.

Unlike other forms of type variable binders, dropping &quot;unused&quot; variables in
an LHsQTyVars can be semantically significant. As a result, we suppress
-Wunused-foralls warnings in exactly one place: in bindHsQTyVars.
-}</span><span>
</span><span id="line-1043"></span><span>
</span><span id="line-1044"></span><span id="local-6989586621681130641"><span class="annot"><a href="GHC.Rename.HsType.html#bindHsForAllTelescope"><span class="hs-identifier hs-type">bindHsForAllTelescope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-1045"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTelescope"><span class="hs-identifier hs-type">HsForAllTelescope</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-1046"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTelescope"><span class="hs-identifier hs-type">HsForAllTelescope</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130641"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1047"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130641"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-1048"></span><span id="bindHsForAllTelescope"><span class="annot"><span class="annottext">bindHsForAllTelescope :: forall a.
HsDocContext
-&gt; HsForAllTelescope GhcPs
-&gt; (HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindHsForAllTelescope"><span class="hs-identifier hs-var hs-var">bindHsForAllTelescope</span></a></span></span><span> </span><span id="local-6989586621681129421"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129421"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129420"><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129420"><span class="hs-identifier hs-var">tele</span></a></span></span><span> </span><span id="local-6989586621681129419"><span class="annot"><span class="annottext">HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129419"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1049"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681129420"><span class="hs-identifier hs-var">tele</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1050"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllVis"><span class="hs-identifier hs-type">HsForAllVis</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsf_vis_bndrs :: forall pass. HsForAllTelescope pass -&gt; [LHsTyVarBndr () pass]
</span><a href="GHC.Hs.Type.html#hsf_vis_bndrs"><span class="hs-identifier hs-var">hsf_vis_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129416"><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129416"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1051"></span><span>      </span><span class="annot"><span class="annottext">HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe Any
-&gt; [LHsTyVarBndr () GhcPs]
-&gt; ([LHsTyVarBndr () GhcRn] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall flag a b.
OutputableBndrFlag flag =&gt;
HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe a
-&gt; [LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier hs-var">bindLHsTyVarBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129421"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Any
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681129416"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(([LHsTyVarBndr () GhcRn] -&gt; RnM (a, FreeVars))
 -&gt; RnM (a, FreeVars))
-&gt; ([LHsTyVarBndr () GhcRn] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681129414"><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn]
</span><a href="#local-6989586621681129414"><span class="hs-identifier hs-var">bndrs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1052"></span><span>        </span><span class="annot"><span class="annottext">HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129419"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">(HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars))
-&gt; HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn] -&gt; HsForAllTelescope GhcRn
forall (p :: Pass).
[LHsTyVarBndr () (GhcPass p)] -&gt; HsForAllTelescope (GhcPass p)
</span><a href="GHC.Hs.Type.html#mkHsForAllVisTele"><span class="hs-identifier hs-var">mkHsForAllVisTele</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcRn]
</span><a href="#local-6989586621681129414"><span class="hs-identifier hs-var">bndrs'</span></a></span><span>
</span><span id="line-1053"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllInvis"><span class="hs-identifier hs-type">HsForAllInvis</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsf_invis_bndrs :: forall pass.
HsForAllTelescope pass -&gt; [LHsTyVarBndr Specificity pass]
</span><a href="GHC.Hs.Type.html#hsf_invis_bndrs"><span class="hs-identifier hs-var">hsf_invis_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681129410"><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcPs]
</span><a href="#local-6989586621681129410"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1054"></span><span>      </span><span class="annot"><span class="annottext">HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe Any
-&gt; [LHsTyVarBndr Specificity GhcPs]
-&gt; ([LHsTyVarBndr Specificity GhcRn] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall flag a b.
OutputableBndrFlag flag =&gt;
HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe a
-&gt; [LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier hs-var">bindLHsTyVarBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129421"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Any
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcPs]
</span><a href="#local-6989586621681129410"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">(([LHsTyVarBndr Specificity GhcRn] -&gt; RnM (a, FreeVars))
 -&gt; RnM (a, FreeVars))
-&gt; ([LHsTyVarBndr Specificity GhcRn] -&gt; RnM (a, FreeVars))
-&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681129409"><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcRn]
</span><a href="#local-6989586621681129409"><span class="hs-identifier hs-var">bndrs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1055"></span><span>        </span><span class="annot"><span class="annottext">HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars)
</span><a href="#local-6989586621681129419"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="annot"><span class="annottext">(HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars))
-&gt; HsForAllTelescope GhcRn -&gt; RnM (a, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcRn] -&gt; HsForAllTelescope GhcRn
forall (p :: Pass).
[LHsTyVarBndr Specificity (GhcPass p)]
-&gt; HsForAllTelescope (GhcPass p)
</span><a href="GHC.Hs.Type.html#mkHsForAllInvisTele"><span class="hs-identifier hs-var">mkHsForAllInvisTele</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcRn]
</span><a href="#local-6989586621681129409"><span class="hs-identifier hs-var">bndrs'</span></a></span><span>
</span><span id="line-1056"></span><span>
</span><span id="line-1057"></span><span class="hs-comment">-- | Should GHC warn if a quantified type variable goes unused? Usually, the</span><span>
</span><span id="line-1058"></span><span class="hs-comment">-- answer is \&quot;yes\&quot;, but in the particular case of binding 'LHsQTyVars', we</span><span>
</span><span id="line-1059"></span><span class="hs-comment">-- avoid emitting warnings.</span><span>
</span><span id="line-1060"></span><span class="hs-comment">-- See @Note [Suppress -Wunused-foralls when binding LHsQTyVars]@.</span><span>
</span><span id="line-1061"></span><span class="hs-keyword">data</span><span> </span><span id="WarnUnusedForalls"><span class="annot"><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span></span><span>
</span><span id="line-1062"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="WarnUnusedForalls"><span class="annot"><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span></span><span>
</span><span id="line-1063"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NoWarnUnusedForalls"><span class="annot"><a href="GHC.Rename.HsType.html#NoWarnUnusedForalls"><span class="hs-identifier hs-var">NoWarnUnusedForalls</span></a></span></span><span>
</span><span id="line-1064"></span><span>
</span><span id="line-1065"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681129405"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-type">WarnUnusedForalls</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1066"></span><span>  </span><span id="local-6989586621681129404"><span class="annot"><span class="annottext">ppr :: WarnUnusedForalls -&gt; MsgDoc
</span><a href="#local-6989586621681129404"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621681129403"><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="#local-6989586621681129403"><span class="hs-identifier hs-var">wuf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; MsgDoc) -&gt; String -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="#local-6989586621681129403"><span class="hs-identifier hs-var">wuf</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1067"></span><span>    </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;WarnUnusedForalls&quot;</span></span><span>
</span><span id="line-1068"></span><span>    </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#NoWarnUnusedForalls"><span class="hs-identifier hs-var">NoWarnUnusedForalls</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NoWarnUnusedForalls&quot;</span></span><span>
</span><span id="line-1069"></span><span>
</span><span id="line-1070"></span><span id="local-6989586621681130527"><span id="local-6989586621681130528"><span id="local-6989586621681130529"><span class="annot"><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier hs-type">bindLHsTyVarBndrs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#OutputableBndrFlag"><span class="hs-identifier hs-type">OutputableBndrFlag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130529"><span class="hs-identifier hs-type">flag</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1071"></span><span>                  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-1072"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-type">WarnUnusedForalls</span></a></span><span>
</span><span id="line-1073"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130528"><span class="hs-identifier hs-type">a</span></a></span><span>               </span><span class="hs-comment">-- Just _  =&gt; an associated type decl</span><span>
</span><span id="line-1074"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130529"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- User-written tyvars</span><span>
</span><span id="line-1075"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130529"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130527"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1076"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130527"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-1077"></span><span id="bindLHsTyVarBndrs"><span class="annot"><span class="annottext">bindLHsTyVarBndrs :: forall flag a b.
OutputableBndrFlag flag =&gt;
HsDocContext
-&gt; WarnUnusedForalls
-&gt; Maybe a
-&gt; [LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndrs"><span class="hs-identifier hs-var hs-var">bindLHsTyVarBndrs</span></a></span></span><span> </span><span id="local-6989586621681129393"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129393"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129392"><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="#local-6989586621681129392"><span class="hs-identifier hs-var">wuf</span></a></span></span><span> </span><span id="local-6989586621681129391"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129391"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span id="local-6989586621681129390"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129390"><span class="hs-identifier hs-var">tv_bndrs</span></a></span></span><span> </span><span id="local-6989586621681129389"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129389"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-1078"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isNothing"><span class="hs-identifier hs-var">isNothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129391"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; TcRn ()
</span><a href="GHC.Rename.Utils.html#checkShadowedRdrNames"><span class="hs-identifier hs-var">checkShadowedRdrNames</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129387"><span class="hs-identifier hs-var">tv_names_w_loc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1079"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; TcRn ()
</span><a href="GHC.Rename.Utils.html#checkDupRdrNames"><span class="hs-identifier hs-var">checkDupRdrNames</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129387"><span class="hs-identifier hs-var">tv_names_w_loc</span></a></span><span>
</span><span id="line-1080"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129386"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129390"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129389"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1081"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1082"></span><span>    </span><span id="local-6989586621681129387"><span class="annot"><span class="annottext">tv_names_w_loc :: FreeKiTyVars
</span><a href="#local-6989586621681129387"><span class="hs-identifier hs-var hs-var">tv_names_w_loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTyVarBndr flag GhcPs -&gt; GenLocated SrcSpan RdrName)
-&gt; [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcPs -&gt; GenLocated SrcSpan RdrName
forall flag (p :: Pass).
LHsTyVarBndr flag (GhcPass p) -&gt; Located (IdP (GhcPass p))
</span><a href="GHC.Hs.Type.html#hsLTyVarLocName"><span class="hs-identifier hs-var">hsLTyVarLocName</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129390"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span>
</span><span id="line-1083"></span><span>
</span><span id="line-1084"></span><span>    </span><span id="local-6989586621681129386"><span class="annot"><span class="annottext">go :: [LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129386"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span id="local-6989586621681129385"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129385"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129385"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1085"></span><span>    </span><span class="annot"><a href="#local-6989586621681129386"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129384"><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcPs
</span><a href="#local-6989586621681129384"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681129383"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129383"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129382"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129382"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDocContext
-&gt; Maybe a
-&gt; LHsTyVarBndr flag GhcPs
-&gt; (LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall a flag b.
HsDocContext
-&gt; Maybe a
-&gt; LHsTyVarBndr flag GhcPs
-&gt; (LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndr"><span class="hs-identifier hs-var">bindLHsTyVarBndr</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129393"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129391"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcPs
</span><a href="#local-6989586621681129384"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">((LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars))
 -&gt; RnM (b, FreeVars))
-&gt; (LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129381"><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129381"><span class="hs-identifier hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1086"></span><span>                             </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129380"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681129380"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129379"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129379"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129386"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129383"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="annot"><span class="annottext">(([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
 -&gt; RnM (b, FreeVars))
-&gt; ([LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681129378"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn]
</span><a href="#local-6989586621681129378"><span class="hs-identifier hs-var">bs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1087"></span><span>                                                </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn] -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129382"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129381"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
-&gt; [LHsTyVarBndr flag GhcRn] -&gt; [LHsTyVarBndr flag GhcRn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcRn]
</span><a href="#local-6989586621681129378"><span class="hs-identifier hs-var">bs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1088"></span><span>                                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn -&gt; FreeVars -&gt; TcRn ()
</span><a href="#local-6989586621681129377"><span class="hs-identifier hs-var">warn_unused</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129381"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129379"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-1089"></span><span>                                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(b, FreeVars) -&gt; RnM (b, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681129380"><span class="hs-identifier hs-var">res</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129379"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1090"></span><span>
</span><span id="line-1091"></span><span>    </span><span id="local-6989586621681129377"><span class="annot"><span class="annottext">warn_unused :: LHsTyVarBndr flag GhcRn -&gt; FreeVars -&gt; TcRn ()
</span><a href="#local-6989586621681129377"><span class="hs-identifier hs-var hs-var">warn_unused</span></a></span></span><span> </span><span id="local-6989586621681129376"><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129376"><span class="hs-identifier hs-var">tv_bndr</span></a></span></span><span> </span><span id="local-6989586621681129375"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129375"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="#local-6989586621681129392"><span class="hs-identifier hs-var">wuf</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1092"></span><span>      </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#WarnUnusedForalls"><span class="hs-identifier hs-var">WarnUnusedForalls</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsTyVarBndr flag GhcRn -&gt; FreeVars -&gt; TcRn ()
forall flag.
OutputableBndrFlag flag =&gt;
HsDocContext -&gt; LHsTyVarBndr flag GhcRn -&gt; FreeVars -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#warnUnusedForAll"><span class="hs-identifier hs-var">warnUnusedForAll</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129393"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129376"><span class="hs-identifier hs-var">tv_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129375"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-1093"></span><span>      </span><span class="annot"><span class="annottext">WarnUnusedForalls
</span><a href="GHC.Rename.HsType.html#NoWarnUnusedForalls"><span class="hs-identifier hs-var">NoWarnUnusedForalls</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1094"></span><span>
</span><span id="line-1095"></span><span id="local-6989586621681130509"><span id="local-6989586621681130510"><span id="local-6989586621681130511"><span class="annot"><a href="GHC.Rename.HsType.html#bindLHsTyVarBndr"><span class="hs-identifier hs-type">bindLHsTyVarBndr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span>
</span><span id="line-1096"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130511"><span class="hs-identifier hs-type">a</span></a></span><span>   </span><span class="hs-comment">-- associated class</span><span>
</span><span id="line-1097"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130510"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-1098"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130510"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130509"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1099"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681130509"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-1100"></span><span id="bindLHsTyVarBndr"><span class="annot"><span class="annottext">bindLHsTyVarBndr :: forall a flag b.
HsDocContext
-&gt; Maybe a
-&gt; LHsTyVarBndr flag GhcPs
-&gt; (LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars)
</span><a href="GHC.Rename.HsType.html#bindLHsTyVarBndr"><span class="hs-identifier hs-var hs-var">bindLHsTyVarBndr</span></a></span></span><span> </span><span id="local-6989586621681129365"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129365"><span class="hs-identifier hs-var">_doc</span></a></span></span><span> </span><span id="local-6989586621681129364"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129364"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129363"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129363"><span class="hs-identifier hs-var">loc</span></a></span></span><span>
</span><span id="line-1101"></span><span>                                 </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#UserTyVar"><span class="hs-identifier hs-type">UserTyVar</span></a></span><span> </span><span id="local-6989586621681129361"><span class="annot"><span class="annottext">XUserTyVar GhcPs
</span><a href="#local-6989586621681129361"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681129360"><span class="annot"><span class="annottext">flag
</span><a href="#local-6989586621681129360"><span class="hs-identifier hs-var">fl</span></a></span></span><span>
</span><span id="line-1102"></span><span>                                    </span><span id="local-6989586621681129359"><span class="annot"><span class="annottext">lrdr :: GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129359"><span class="hs-identifier hs-var">lrdr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129358"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129358"><span class="hs-identifier hs-var">lv</span></a></span></span><span> </span><span class="annot"><span class="annottext">IdP GhcPs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129357"><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129357"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-1103"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129356"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129356"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall a.
Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier hs-var">newTyVarNameRn</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129364"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129359"><span class="hs-identifier hs-var">lrdr</span></a></span><span>
</span><span id="line-1104"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (b, FreeVars) -&gt; RnM (b, FreeVars)
forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier hs-var">bindLocalNamesFV</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129356"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(RnM (b, FreeVars) -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars) -&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1105"></span><span>         </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129357"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsTyVarBndr flag GhcRn -&gt; LHsTyVarBndr flag GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129363"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XUserTyVar GhcRn
-&gt; flag -&gt; Located (IdP GhcRn) -&gt; HsTyVarBndr flag GhcRn
forall flag pass.
XUserTyVar pass
-&gt; flag -&gt; Located (IdP pass) -&gt; HsTyVarBndr flag pass
</span><a href="GHC.Hs.Type.html#UserTyVar"><span class="hs-identifier hs-var">UserTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XUserTyVar GhcPs
XUserTyVar GhcRn
</span><a href="#local-6989586621681129361"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">flag
</span><a href="#local-6989586621681129360"><span class="hs-identifier hs-var">fl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129358"><span class="hs-identifier hs-var">lv</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129356"><span class="hs-identifier hs-var">nm</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1106"></span><span>
</span><span id="line-1107"></span><span class="annot"><a href="GHC.Rename.HsType.html#bindLHsTyVarBndr"><span class="hs-identifier hs-var">bindLHsTyVarBndr</span></a></span><span> </span><span id="local-6989586621681129355"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129355"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621681129354"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129354"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129353"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129353"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#KindedTyVar"><span class="hs-identifier hs-type">KindedTyVar</span></a></span><span> </span><span id="local-6989586621681129351"><span class="annot"><span class="annottext">XKindedTyVar GhcPs
</span><a href="#local-6989586621681129351"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681129350"><span class="annot"><span class="annottext">flag
</span><a href="#local-6989586621681129350"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span id="local-6989586621681129349"><span class="annot"><span class="annottext">lrdr :: GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129349"><span class="hs-identifier hs-var">lrdr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129348"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129348"><span class="hs-identifier hs-var">lv</span></a></span></span><span> </span><span class="annot"><span class="annottext">IdP GhcPs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129347"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129347"><span class="hs-identifier hs-var">kind</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1108"></span><span>                 </span><span id="local-6989586621681129346"><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129346"><span class="hs-identifier hs-var">thing_inside</span></a></span></span><span>
</span><span id="line-1109"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129345"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129345"><span class="hs-identifier hs-var">sig_ok</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; TcRnIf TcGblEnv TcLclEnv Bool
forall gbl lcl. Extension -&gt; TcRnIf gbl lcl Bool
</span><a href="GHC.Tc.Utils.Monad.html#xoptM"><span class="hs-identifier hs-var">xoptM</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#KindSignatures"><span class="hs-identifier hs-var">LangExt.KindSignatures</span></a></span><span>
</span><span id="line-1110"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129345"><span class="hs-identifier hs-var">sig_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#badKindSigErr"><span class="hs-identifier hs-var">badKindSigErr</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129355"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129347"><span class="hs-identifier hs-var">kind</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1111"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129344"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129344"><span class="hs-identifier hs-var">kind'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129343"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129343"><span class="hs-identifier hs-var">fvs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsKind"><span class="hs-identifier hs-var">rnLHsKind</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129355"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129347"><span class="hs-identifier hs-var">kind</span></a></span><span>
</span><span id="line-1112"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129342"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129342"><span class="hs-identifier hs-var">tv_nm</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall a.
Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier hs-var">newTyVarNameRn</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129354"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681129349"><span class="hs-identifier hs-var">lrdr</span></a></span><span>
</span><span id="line-1113"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129341"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681129341"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129340"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129340"><span class="hs-identifier hs-var">fvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; RnM (b, FreeVars) -&gt; RnM (b, FreeVars)
forall a. [Name] -&gt; RnM (a, FreeVars) -&gt; RnM (a, FreeVars)
</span><a href="GHC.Rename.Utils.html#bindLocalNamesFV"><span class="hs-identifier hs-var">bindLocalNamesFV</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129342"><span class="hs-identifier hs-var">tv_nm</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1114"></span><span>               </span><span class="annot"><span class="annottext">(RnM (b, FreeVars) -&gt; RnM (b, FreeVars))
-&gt; RnM (b, FreeVars) -&gt; RnM (b, FreeVars)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcRn -&gt; RnM (b, FreeVars)
</span><a href="#local-6989586621681129346"><span class="hs-identifier hs-var">thing_inside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsTyVarBndr flag GhcRn -&gt; LHsTyVarBndr flag GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129353"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XKindedTyVar GhcRn
-&gt; flag
-&gt; Located (IdP GhcRn)
-&gt; LHsType GhcRn
-&gt; HsTyVarBndr flag GhcRn
forall flag pass.
XKindedTyVar pass
-&gt; flag
-&gt; Located (IdP pass)
-&gt; LHsKind pass
-&gt; HsTyVarBndr flag pass
</span><a href="GHC.Hs.Type.html#KindedTyVar"><span class="hs-identifier hs-var">KindedTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XKindedTyVar GhcPs
XKindedTyVar GhcRn
</span><a href="#local-6989586621681129351"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">flag
</span><a href="#local-6989586621681129350"><span class="hs-identifier hs-var">fl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Name -&gt; GenLocated SrcSpan Name
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129348"><span class="hs-identifier hs-var">lv</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129342"><span class="hs-identifier hs-var">tv_nm</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129344"><span class="hs-identifier hs-var">kind'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1115"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(b, FreeVars) -&gt; RnM (b, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681129341"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129343"><span class="hs-identifier hs-var">fvs1</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars -&gt; FreeVars -&gt; FreeVars
</span><a href="GHC.Types.Name.Set.html#plusFV"><span class="hs-operator hs-var">`plusFV`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129340"><span class="hs-identifier hs-var">fvs2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1116"></span><span>
</span><span id="line-1117"></span><span id="local-6989586621681130618"><span class="annot"><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier hs-type">newTyVarNameRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130618"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-comment">-- associated class</span><span>
</span><span id="line-1118"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span></span><span>
</span><span id="line-1119"></span><span id="newTyVarNameRn"><span class="annot"><span class="annottext">newTyVarNameRn :: forall a.
Maybe a
-&gt; GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.HsType.html#newTyVarNameRn"><span class="hs-identifier hs-var hs-var">newTyVarNameRn</span></a></span></span><span> </span><span id="local-6989586621681129337"><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129337"><span class="hs-identifier hs-var">mb_assoc</span></a></span></span><span> </span><span id="local-6989586621681129336"><span class="annot"><span class="annottext">lrdr :: GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681129336"><span class="hs-identifier hs-var">lrdr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129335"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129335"><span class="hs-identifier hs-var">rdr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1120"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129334"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129334"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM LocalRdrEnv
</span><a href="GHC.Tc.Utils.Monad.html#getLocalRdrEnv"><span class="hs-identifier hs-var">getLocalRdrEnv</span></a></span><span>
</span><span id="line-1121"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe a
</span><a href="#local-6989586621681129337"><span class="hs-identifier hs-var">mb_assoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv -&gt; RdrName -&gt; Maybe Name
</span><a href="GHC.Types.Name.Reader.html#lookupLocalRdrEnv"><span class="hs-identifier hs-var">lookupLocalRdrEnv</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129334"><span class="hs-identifier hs-var">rdr_env</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129335"><span class="hs-identifier hs-var">rdr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1122"></span><span>           </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681129332"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129332"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129332"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1123"></span><span>              </span><span class="hs-comment">-- Use the same Name as the parent class decl</span><span>
</span><span id="line-1124"></span><span>
</span><span id="line-1125"></span><span>           </span><span class="annot"><span class="annottext">(Maybe a, Maybe Name)
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; IOEnv (Env TcGblEnv TcLclEnv) Name
</span><a href="GHC.Rename.Utils.html#newLocalBndrRn"><span class="hs-identifier hs-var">newLocalBndrRn</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681129336"><span class="hs-identifier hs-var">lrdr</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1126"></span><span class="hs-comment">{-
*********************************************************
*                                                       *
        ConDeclField
*                                                       *
*********************************************************

When renaming a ConDeclField, we have to find the FieldLabel
associated with each field.  But we already have all the FieldLabels
available (since they were brought into scope by
GHC.Rename.Names.getLocalNonValBinders), so we just take the list as an
argument, build a map and look them up.
-}</span><span>
</span><span id="line-1139"></span><span>
</span><span id="line-1140"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnConDeclFields"><span class="hs-identifier hs-type">rnConDeclFields</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LConDeclField"><span class="hs-identifier hs-type">LConDeclField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1141"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LConDeclField"><span class="hs-identifier hs-type">LConDeclField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1142"></span><span class="hs-comment">-- Also called from GHC.Rename.Module</span><span>
</span><span id="line-1143"></span><span class="hs-comment">-- No wildcards can appear in record fields</span><span>
</span><span id="line-1144"></span><span id="rnConDeclFields"><span class="annot"><span class="annottext">rnConDeclFields :: HsDocContext
-&gt; [FieldLabel]
-&gt; [LConDeclField GhcPs]
-&gt; RnM ([LConDeclField GhcRn], FreeVars)
</span><a href="GHC.Rename.HsType.html#rnConDeclFields"><span class="hs-identifier hs-var hs-var">rnConDeclFields</span></a></span></span><span> </span><span id="local-6989586621681129331"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129331"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span id="local-6989586621681129330"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681129330"><span class="hs-identifier hs-var">fls</span></a></span></span><span> </span><span id="local-6989586621681129329"><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681129329"><span class="hs-identifier hs-var">fields</span></a></span></span><span>
</span><span id="line-1145"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LConDeclField GhcPs -&gt; RnM (LConDeclField GhcRn, FreeVars))
-&gt; [LConDeclField GhcPs] -&gt; RnM ([LConDeclField GhcRn], FreeVars)
forall a b. (a -&gt; RnM (b, FreeVars)) -&gt; [a] -&gt; RnM ([b], FreeVars)
</span><a href="GHC.Rename.Utils.html#mapFvRn"><span class="hs-identifier hs-var">mapFvRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastStringEnv FieldLabel
-&gt; RnTyKiEnv
-&gt; LConDeclField GhcPs
-&gt; RnM (LConDeclField GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnField"><span class="hs-identifier hs-var">rnField</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv FieldLabel
</span><a href="#local-6989586621681129327"><span class="hs-identifier hs-var">fl_env</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129326"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681129329"><span class="hs-identifier hs-var">fields</span></a></span><span>
</span><span id="line-1146"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1147"></span><span>    </span><span id="local-6989586621681129326"><span class="annot"><span class="annottext">env :: RnTyKiEnv
</span><a href="#local-6989586621681129326"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; TypeOrKind -&gt; RnTyKiWhat -&gt; RnTyKiEnv
</span><a href="GHC.Rename.HsType.html#mkTyKiEnv"><span class="hs-identifier hs-var">mkTyKiEnv</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129331"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">TypeOrKind
</span><a href="GHC.Types.Basic.html#TypeLevel"><span class="hs-identifier hs-var">TypeLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiWhat
</span><a href="GHC.Rename.HsType.html#RnTypeBody"><span class="hs-identifier hs-var">RnTypeBody</span></a></span><span>
</span><span id="line-1148"></span><span>    </span><span id="local-6989586621681129327"><span class="annot"><span class="annottext">fl_env :: FastStringEnv FieldLabel
</span><a href="#local-6989586621681129327"><span class="hs-identifier hs-var hs-var">fl_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(FastString, FieldLabel)] -&gt; FastStringEnv FieldLabel
forall a. [(FastString, a)] -&gt; FastStringEnv a
</span><a href="GHC.Data.FastString.Env.html#mkFsEnv"><span class="hs-identifier hs-var">mkFsEnv</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; FastString
forall a. FieldLbl a -&gt; FastString
</span><a href="GHC.Types.FieldLabel.html#flLabel"><span class="hs-identifier hs-var hs-var">flLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681129323"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681129323"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681129323"><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681129323"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681129330"><span class="hs-identifier hs-var">fls</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1149"></span><span>
</span><span id="line-1150"></span><span class="annot"><a href="GHC.Rename.HsType.html#rnField"><span class="hs-identifier hs-type">rnField</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.Env.html#FastStringEnv"><span class="hs-identifier hs-type">FastStringEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Types.FieldLabel.html#FieldLabel"><span class="hs-identifier hs-type">FieldLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LConDeclField"><span class="hs-identifier hs-type">LConDeclField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-1151"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LConDeclField"><span class="hs-identifier hs-type">LConDeclField</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1152"></span><span id="rnField"><span class="annot"><span class="annottext">rnField :: FastStringEnv FieldLabel
-&gt; RnTyKiEnv
-&gt; LConDeclField GhcPs
-&gt; RnM (LConDeclField GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnField"><span class="hs-identifier hs-var hs-var">rnField</span></a></span></span><span> </span><span id="local-6989586621681129322"><span class="annot"><span class="annottext">FastStringEnv FieldLabel
</span><a href="#local-6989586621681129322"><span class="hs-identifier hs-var">fl_env</span></a></span></span><span> </span><span id="local-6989586621681129321"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129321"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129320"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129320"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#ConDeclField"><span class="hs-identifier hs-type">ConDeclField</span></a></span><span> </span><span class="annot"><span class="annottext">XConDeclField GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129318"><span class="annot"><span class="annottext">[LFieldOcc GhcPs]
</span><a href="#local-6989586621681129318"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span id="local-6989586621681129317"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129317"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681129316"><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621681129316"><span class="hs-identifier hs-var">haddock_doc</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1153"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681129315"><span class="annot"><span class="annottext">new_names :: [GenLocated SrcSpan (FieldOcc GhcRn)]
</span><a href="#local-6989586621681129315"><span class="hs-identifier hs-var hs-var">new_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LFieldOcc GhcPs -&gt; GenLocated SrcSpan (FieldOcc GhcRn))
-&gt; [LFieldOcc GhcPs] -&gt; [GenLocated SrcSpan (FieldOcc GhcRn)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FieldOcc GhcPs -&gt; FieldOcc GhcRn)
-&gt; LFieldOcc GhcPs -&gt; GenLocated SrcSpan (FieldOcc GhcRn)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">FieldOcc GhcPs -&gt; FieldOcc GhcRn
</span><a href="#local-6989586621681129314"><span class="hs-identifier hs-var">lookupField</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LFieldOcc GhcPs]
</span><a href="#local-6989586621681129318"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-1154"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129313"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129313"><span class="hs-identifier hs-var">new_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129312"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129312"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; LHsType GhcPs -&gt; RnM (LHsType GhcRn, FreeVars)
</span><a href="GHC.Rename.HsType.html#rnLHsTyKi"><span class="hs-identifier hs-var">rnLHsTyKi</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129321"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129317"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1155"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681129311"><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621681129311"><span class="hs-identifier hs-var">new_haddock_doc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString -&gt; RnM (Maybe LHsDocString)
</span><a href="GHC.Rename.Doc.html#rnMbLHsDoc"><span class="hs-identifier hs-var">rnMbLHsDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621681129316"><span class="hs-identifier hs-var">haddock_doc</span></a></span><span>
</span><span id="line-1156"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LConDeclField GhcRn, FreeVars)
-&gt; RnM (LConDeclField GhcRn, FreeVars)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; ConDeclField GhcRn -&gt; LConDeclField GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129320"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XConDeclField GhcRn
-&gt; [GenLocated SrcSpan (FieldOcc GhcRn)]
-&gt; LHsType GhcRn
-&gt; Maybe LHsDocString
-&gt; ConDeclField GhcRn
forall pass.
XConDeclField pass
-&gt; [LFieldOcc pass]
-&gt; LBangType pass
-&gt; Maybe LHsDocString
-&gt; ConDeclField pass
</span><a href="GHC.Hs.Type.html#ConDeclField"><span class="hs-identifier hs-var">ConDeclField</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConDeclField GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">[GenLocated SrcSpan (FieldOcc GhcRn)]
</span><a href="#local-6989586621681129315"><span class="hs-identifier hs-var">new_names</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129313"><span class="hs-identifier hs-var">new_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LHsDocString
</span><a href="#local-6989586621681129311"><span class="hs-identifier hs-var">new_haddock_doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1157"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129312"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1158"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1159"></span><span>    </span><span class="annot"><a href="#local-6989586621681129314"><span class="hs-identifier hs-type">lookupField</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-type">FieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-type">FieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-1160"></span><span>    </span><span id="local-6989586621681129314"><span class="annot"><span class="annottext">lookupField :: FieldOcc GhcPs -&gt; FieldOcc GhcRn
</span><a href="#local-6989586621681129314"><span class="hs-identifier hs-var hs-var">lookupField</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-type">FieldOcc</span></a></span><span> </span><span class="annot"><span class="annottext">XCFieldOcc GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129309"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129309"><span class="hs-identifier hs-var">lr</span></a></span></span><span> </span><span id="local-6989586621681129308"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129308"><span class="hs-identifier hs-var">rdr</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1161"></span><span>        </span><span class="annot"><span class="annottext">XCFieldOcc GhcRn -&gt; GenLocated SrcSpan RdrName -&gt; FieldOcc GhcRn
forall pass.
XCFieldOcc pass -&gt; GenLocated SrcSpan RdrName -&gt; FieldOcc pass
</span><a href="GHC.Hs.Type.html#FieldOcc"><span class="hs-identifier hs-var">FieldOcc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel
</span><a href="#local-6989586621681129306"><span class="hs-identifier hs-var">fl</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; RdrName -&gt; GenLocated SrcSpan RdrName
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129309"><span class="hs-identifier hs-var">lr</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129308"><span class="hs-identifier hs-var">rdr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1162"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-1163"></span><span>        </span><span id="local-6989586621681129305"><span class="annot"><span class="annottext">lbl :: FastString
</span><a href="#local-6989586621681129305"><span class="hs-identifier hs-var hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; OccName -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; OccName
</span><a href="GHC.Types.Name.Reader.html#rdrNameOcc"><span class="hs-identifier hs-var">rdrNameOcc</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129308"><span class="hs-identifier hs-var">rdr</span></a></span><span>
</span><span id="line-1164"></span><span>        </span><span id="local-6989586621681129306"><span class="annot"><span class="annottext">fl :: FieldLabel
</span><a href="#local-6989586621681129306"><span class="hs-identifier hs-var hs-var">fl</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe FieldLabel -&gt; FieldLabel
forall a. HasCallStack =&gt; String -&gt; Maybe a -&gt; a
</span><a href="GHC.Data.Maybe.html#expectJust"><span class="hs-identifier hs-var">expectJust</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;rnField&quot;</span></span><span> </span><span class="annot"><span class="annottext">(Maybe FieldLabel -&gt; FieldLabel) -&gt; Maybe FieldLabel -&gt; FieldLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv FieldLabel -&gt; FastString -&gt; Maybe FieldLabel
forall a. FastStringEnv a -&gt; FastString -&gt; Maybe a
</span><a href="GHC.Data.FastString.Env.html#lookupFsEnv"><span class="hs-identifier hs-var">lookupFsEnv</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv FieldLabel
</span><a href="#local-6989586621681129322"><span class="hs-identifier hs-var">fl_env</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681129305"><span class="hs-identifier hs-var">lbl</span></a></span><span>
</span><span id="line-1165"></span><span>
</span><span id="line-1166"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
        Fixities and precedence parsing
*                                                                      *
************************************************************************

@mkOpAppRn@ deals with operator fixities.  The argument expressions
are assumed to be already correctly arranged.  It needs the fixities
recorded in the OpApp nodes, because fixity info applies to the things
the programmer actually wrote, so you can't find it out from the Name.

Furthermore, the second argument is guaranteed not to be another
operator application.  Why? Because the parser parses all
operator applications left-associatively, EXCEPT negation, which
we need to handle specially.
Infix types are read in a *right-associative* way, so that
        a `op` b `op` c
is always read in as
        a `op` (b `op` c)

mkHsOpTyRn rearranges where necessary.  The two arguments
have already been renamed and rearranged.  It's made rather tiresome
by the presence of -&gt;, which is a separate syntactic construct.
-}</span><span>
</span><span id="line-1191"></span><span>
</span><span id="line-1192"></span><span class="hs-comment">---------------</span><span>
</span><span id="line-1193"></span><span class="hs-comment">-- Building (ty1 `op1` (ty21 `op2` ty22))</span><span>
</span><span id="line-1194"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-type">mkHsOpTyRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1195"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-1196"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1197"></span><span>
</span><span id="line-1198"></span><span id="mkHsOpTyRn"><span class="annot"><span class="annottext">mkHsOpTyRn :: (LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var hs-var">mkHsOpTyRn</span></a></span></span><span> </span><span id="local-6989586621681129301"><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129301"><span class="hs-identifier hs-var">mk1</span></a></span></span><span> </span><span id="local-6989586621681129300"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129300"><span class="hs-identifier hs-var">pp_op1</span></a></span></span><span> </span><span id="local-6989586621681129299"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129299"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span id="local-6989586621681129298"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129298"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129297"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129297"><span class="hs-identifier hs-var">loc2</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsOpTy"><span class="hs-identifier hs-type">HsOpTy</span></a></span><span> </span><span id="local-6989586621681129296"><span class="annot"><span class="annottext">XOpTy GhcRn
</span><a href="#local-6989586621681129296"><span class="hs-identifier hs-var">noExtField</span></a></span></span><span> </span><span id="local-6989586621681129295"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129295"><span class="hs-identifier hs-var">ty21</span></a></span></span><span> </span><span id="local-6989586621681129294"><span class="annot"><span class="annottext">Located (IdP GhcRn)
</span><a href="#local-6989586621681129294"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129293"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129293"><span class="hs-identifier hs-var">ty22</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1199"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129292"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129292"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupTyFixityRn"><span class="hs-identifier hs-var">lookupTyFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (IdP GhcRn)
</span><a href="#local-6989586621681129294"><span class="hs-identifier hs-var">op2</span></a></span><span>
</span><span id="line-1200"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; (LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; SrcSpan
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mk_hs_op_ty"><span class="hs-identifier hs-var">mk_hs_op_ty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129301"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129300"><span class="hs-identifier hs-var">pp_op1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129299"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129298"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-1201"></span><span>                      </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681129290"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129290"><span class="hs-identifier hs-var">t1</span></a></span></span><span> </span><span id="local-6989586621681129289"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129289"><span class="hs-identifier hs-var">t2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">XOpTy GhcRn
-&gt; LHsType GhcRn
-&gt; Located (IdP GhcRn)
-&gt; LHsType GhcRn
-&gt; HsType GhcRn
forall pass.
XOpTy pass
-&gt; LHsType pass
-&gt; Located (IdP pass)
-&gt; LHsType pass
-&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsOpTy"><span class="hs-identifier hs-var">HsOpTy</span></a></span><span> </span><span class="annot"><span class="annottext">XOpTy GhcRn
</span><a href="#local-6989586621681129296"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129290"><span class="hs-identifier hs-var">t1</span></a></span><span> </span><span class="annot"><span class="annottext">Located (IdP GhcRn)
</span><a href="#local-6989586621681129294"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129289"><span class="hs-identifier hs-var">t2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1202"></span><span>                      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (IdP GhcRn)
</span><a href="#local-6989586621681129294"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129292"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129295"><span class="hs-identifier hs-var">ty21</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129293"><span class="hs-identifier hs-var">ty22</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129297"><span class="hs-identifier hs-var">loc2</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1203"></span><span>
</span><span id="line-1204"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var">mkHsOpTyRn</span></a></span><span> </span><span id="local-6989586621681129288"><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129288"><span class="hs-identifier hs-var">mk1</span></a></span></span><span> </span><span id="local-6989586621681129287"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129287"><span class="hs-identifier hs-var">pp_op1</span></a></span></span><span> </span><span id="local-6989586621681129286"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129286"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span id="local-6989586621681129285"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129285"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129284"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129284"><span class="hs-identifier hs-var">loc2</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-type">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">XFunTy GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129283"><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129283"><span class="hs-identifier hs-var">mult</span></a></span></span><span> </span><span id="local-6989586621681129282"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129282"><span class="hs-identifier hs-var">ty21</span></a></span></span><span> </span><span id="local-6989586621681129281"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129281"><span class="hs-identifier hs-var">ty22</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1205"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; (LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; SrcSpan
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mk_hs_op_ty"><span class="hs-identifier hs-var">mk_hs_op_ty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129288"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129287"><span class="hs-identifier hs-var">pp_op1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129286"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129285"><span class="hs-identifier hs-var">ty1</span></a></span><span>
</span><span id="line-1206"></span><span>                </span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129280"><span class="hs-identifier hs-var">hs_fun_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Types.Prim.html#funTyConName"><span class="hs-identifier hs-var">funTyConName</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#funTyFixity"><span class="hs-identifier hs-var">funTyFixity</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129282"><span class="hs-identifier hs-var">ty21</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129281"><span class="hs-identifier hs-var">ty22</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129284"><span class="hs-identifier hs-var">loc2</span></a></span><span>
</span><span id="line-1207"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1208"></span><span>    </span><span id="local-6989586621681129280"><span class="annot"><span class="annottext">hs_fun_ty :: LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129280"><span class="hs-identifier hs-var hs-var">hs_fun_ty</span></a></span></span><span> </span><span id="local-6989586621681129279"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129279"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621681129278"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129278"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">XFunTy GhcRn
-&gt; HsArrow GhcRn -&gt; LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
forall pass.
XFunTy pass
-&gt; HsArrow pass -&gt; LHsType pass -&gt; LHsType pass -&gt; HsType pass
</span><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-var">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XFunTy GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcRn
</span><a href="#local-6989586621681129283"><span class="hs-identifier hs-var">mult</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129279"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129278"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1209"></span><span>
</span><span id="line-1210"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var">mkHsOpTyRn</span></a></span><span> </span><span id="local-6989586621681129277"><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129277"><span class="hs-identifier hs-var">mk1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129276"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129276"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681129275"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129275"><span class="hs-identifier hs-var">ty2</span></a></span></span><span>              </span><span class="hs-comment">-- Default case, no rearrangment</span><span>
</span><span id="line-1211"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsType GhcRn -&gt; RnM (HsType GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129277"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129276"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129275"><span class="hs-identifier hs-var">ty2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1212"></span><span>
</span><span id="line-1213"></span><span class="hs-comment">---------------</span><span>
</span><span id="line-1214"></span><span class="annot"><a href="GHC.Rename.HsType.html#mk_hs_op_ty"><span class="hs-identifier hs-type">mk_hs_op_ty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1215"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-1216"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1217"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>
</span><span id="line-1218"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1219"></span><span id="mk_hs_op_ty"><span class="annot"><span class="annottext">mk_hs_op_ty :: (LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; (LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; SrcSpan
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mk_hs_op_ty"><span class="hs-identifier hs-var hs-var">mk_hs_op_ty</span></a></span></span><span> </span><span id="local-6989586621681129274"><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129274"><span class="hs-identifier hs-var">mk1</span></a></span></span><span> </span><span id="local-6989586621681129273"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129273"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span id="local-6989586621681129272"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129272"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span id="local-6989586621681129271"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129271"><span class="hs-identifier hs-var">ty1</span></a></span></span><span>
</span><span id="line-1220"></span><span>            </span><span id="local-6989586621681129270"><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129270"><span class="hs-identifier hs-var">mk2</span></a></span></span><span> </span><span id="local-6989586621681129269"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129269"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129268"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129268"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span id="local-6989586621681129267"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129267"><span class="hs-identifier hs-var">ty21</span></a></span></span><span> </span><span id="local-6989586621681129266"><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129266"><span class="hs-identifier hs-var">ty22</span></a></span></span><span> </span><span id="local-6989586621681129265"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129265"><span class="hs-identifier hs-var">loc2</span></a></span></span><span>
</span><span id="line-1221"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129264"><span class="hs-identifier hs-var">nofix_error</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129273"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129272"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129269"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129268"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1222"></span><span>                         </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsType GhcRn -&gt; RnM (HsType GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129274"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129271"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsType GhcRn -&gt; LHsType GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129265"><span class="hs-identifier hs-var">loc2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129270"><span class="hs-identifier hs-var">mk2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129267"><span class="hs-identifier hs-var">ty21</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129266"><span class="hs-identifier hs-var">ty22</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1223"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129261"><span class="hs-identifier hs-var">associate_right</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsType GhcRn -&gt; RnM (HsType GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129274"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129271"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsType GhcRn -&gt; LHsType GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129265"><span class="hs-identifier hs-var">loc2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129270"><span class="hs-identifier hs-var">mk2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129267"><span class="hs-identifier hs-var">ty21</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129266"><span class="hs-identifier hs-var">ty22</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1224"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- Rearrange to ((ty1 `op1` ty21) `op2` ty22)</span><span>
</span><span id="line-1225"></span><span>                           </span><span id="local-6989586621681129260"><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129260"><span class="hs-identifier hs-var">new_ty</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn)
-&gt; Name
-&gt; Fixity
-&gt; LHsType GhcRn
-&gt; LHsType GhcRn
-&gt; RnM (HsType GhcRn)
</span><a href="GHC.Rename.HsType.html#mkHsOpTyRn"><span class="hs-identifier hs-var">mkHsOpTyRn</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129274"><span class="hs-identifier hs-var">mk1</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129273"><span class="hs-identifier hs-var">op1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129272"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129271"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129267"><span class="hs-identifier hs-var">ty21</span></a></span><span>
</span><span id="line-1226"></span><span>                         </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">HsType GhcRn -&gt; RnM (HsType GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcRn -&gt; LHsType GhcRn -&gt; HsType GhcRn
</span><a href="#local-6989586621681129270"><span class="hs-identifier hs-var">mk2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcRn -&gt; LHsType GhcRn
forall e. e -&gt; Located e
</span><a href="GHC.Types.SrcLoc.html#noLoc"><span class="hs-identifier hs-var">noLoc</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcRn
</span><a href="#local-6989586621681129260"><span class="hs-identifier hs-var">new_ty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LHsType GhcRn
</span><a href="#local-6989586621681129266"><span class="hs-identifier hs-var">ty22</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1227"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1228"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681129264"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129264"><span class="hs-identifier hs-var">nofix_error</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129261"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129261"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129272"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129268"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1229"></span><span>
</span><span id="line-1230"></span><span>
</span><span id="line-1231"></span><span class="hs-comment">---------------------------</span><span>
</span><span id="line-1232"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-type">mkOpAppRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#NegationHandling"><span class="hs-identifier hs-type">NegationHandling</span></a></span><span>
</span><span id="line-1233"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>             </span><span class="hs-comment">-- Left operand; already rearranged</span><span>
</span><span id="line-1234"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span>   </span><span class="hs-comment">-- Operator and fixity</span><span>
</span><span id="line-1235"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>             </span><span class="hs-comment">-- Right operand (not an OpApp, but might</span><span>
</span><span id="line-1236"></span><span>                                       </span><span class="hs-comment">-- be a NegApp)</span><span>
</span><span id="line-1237"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1238"></span><span>
</span><span id="line-1239"></span><span class="hs-comment">-- (e11 `op1` e12) `op2` e2</span><span>
</span><span id="line-1240"></span><span id="mkOpAppRn"><span class="annot"><span class="annottext">mkOpAppRn :: NegationHandling
-&gt; LHsExpr GhcRn
-&gt; LHsExpr GhcRn
-&gt; Fixity
-&gt; LHsExpr GhcRn
-&gt; RnM (HsExpr GhcRn)
</span><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var hs-var">mkOpAppRn</span></a></span></span><span> </span><span id="local-6989586621681129258"><span class="annot"><span class="annottext">NegationHandling
</span><a href="#local-6989586621681129258"><span class="hs-identifier hs-var">negation_handling</span></a></span></span><span> </span><span id="local-6989586621681129257"><span class="annot"><span class="annottext">e1 :: LHsExpr GhcRn
</span><a href="#local-6989586621681129257"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-type">OpApp</span></a></span><span> </span><span id="local-6989586621681129255"><span class="annot"><span class="annottext">XOpApp GhcRn
</span><a href="#local-6989586621681129255"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span id="local-6989586621681129254"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129254"><span class="hs-identifier hs-var">e11</span></a></span></span><span> </span><span id="local-6989586621681129253"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129253"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span id="local-6989586621681129252"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129252"><span class="hs-identifier hs-var">e12</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129251"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129251"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129250"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129250"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span id="local-6989586621681129249"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129249"><span class="hs-identifier hs-var">e2</span></a></span></span><span>
</span><span id="line-1241"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129248"><span class="hs-identifier hs-var">nofix_error</span></a></span><span>
</span><span id="line-1242"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129253"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129255"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129251"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129250"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1243"></span><span>       </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XOpApp GhcRn
-&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; HsExpr GhcRn
forall p.
XOpApp p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-var">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129250"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129257"><span class="hs-identifier hs-var">e1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129251"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129249"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1244"></span><span>
</span><span id="line-1245"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129246"><span class="hs-identifier hs-var">associate_right</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1246"></span><span>    </span><span id="local-6989586621681129245"><span class="annot"><span class="annottext">HsExpr GhcRn
</span><a href="#local-6989586621681129245"><span class="hs-identifier hs-var">new_e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NegationHandling
-&gt; LHsExpr GhcRn
-&gt; LHsExpr GhcRn
-&gt; Fixity
-&gt; LHsExpr GhcRn
-&gt; RnM (HsExpr GhcRn)
</span><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var">mkOpAppRn</span></a></span><span> </span><span class="annot"><span class="annottext">NegationHandling
</span><a href="#local-6989586621681129258"><span class="hs-identifier hs-var">negation_handling</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129252"><span class="hs-identifier hs-var">e12</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129251"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129250"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129249"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-1247"></span><span>    </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XOpApp GhcRn
-&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; HsExpr GhcRn
forall p.
XOpApp p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-var">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">XOpApp GhcRn
</span><a href="#local-6989586621681129255"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129254"><span class="hs-identifier hs-var">e11</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129253"><span class="hs-identifier hs-var">op1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsExpr GhcRn -&gt; LHsExpr GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129244"><span class="hs-identifier hs-var">loc'</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcRn
</span><a href="#local-6989586621681129245"><span class="hs-identifier hs-var">new_e</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1248"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1249"></span><span>    </span><span id="local-6989586621681129244"><span class="annot"><span class="annottext">loc' :: SrcSpan
</span><a href="#local-6989586621681129244"><span class="hs-identifier hs-var hs-var">loc'</span></a></span></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; SrcSpan
forall a b. Located a -&gt; Located b -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#combineLocs"><span class="hs-identifier hs-var">combineLocs</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129252"><span class="hs-identifier hs-var">e12</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129249"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-1250"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681129248"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129248"><span class="hs-identifier hs-var">nofix_error</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129246"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129246"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129255"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129250"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1251"></span><span>
</span><span id="line-1252"></span><span class="hs-comment">---------------------------</span><span>
</span><span id="line-1253"></span><span class="hs-comment">--      (- neg_arg) `op` e2</span><span>
</span><span id="line-1254"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var">mkOpAppRn</span></a></span><span> </span><span class="annot"><span class="annottext">NegationHandling
</span><a href="GHC.Rename.HsType.html#ReassociateNegation"><span class="hs-identifier hs-var">ReassociateNegation</span></a></span><span> </span><span id="local-6989586621681129241"><span class="annot"><span class="annottext">e1 :: LHsExpr GhcRn
</span><a href="#local-6989586621681129241"><span class="hs-identifier hs-var">e1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-type">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">XNegApp GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129239"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129239"><span class="hs-identifier hs-var">neg_arg</span></a></span></span><span> </span><span id="local-6989586621681129238"><span class="annot"><span class="annottext">SyntaxExpr GhcRn
</span><a href="#local-6989586621681129238"><span class="hs-identifier hs-var">neg_name</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129237"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129237"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129236"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129236"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span id="local-6989586621681129235"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129235"><span class="hs-identifier hs-var">e2</span></a></span></span><span>
</span><span id="line-1255"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129234"><span class="hs-identifier hs-var">nofix_error</span></a></span><span>
</span><span id="line-1256"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier hs-var">negateFixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129237"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129236"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1257"></span><span>       </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XOpApp GhcRn
-&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; HsExpr GhcRn
forall p.
XOpApp p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-var">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129236"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129241"><span class="hs-identifier hs-var">e1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129237"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129235"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1258"></span><span>
</span><span id="line-1259"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129232"><span class="hs-identifier hs-var">associate_right</span></a></span><span>
</span><span id="line-1260"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681129231"><span class="annot"><span class="annottext">HsExpr GhcRn
</span><a href="#local-6989586621681129231"><span class="hs-identifier hs-var">new_e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NegationHandling
-&gt; LHsExpr GhcRn
-&gt; LHsExpr GhcRn
-&gt; Fixity
-&gt; LHsExpr GhcRn
-&gt; RnM (HsExpr GhcRn)
</span><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var">mkOpAppRn</span></a></span><span> </span><span class="annot"><span class="annottext">NegationHandling
</span><a href="GHC.Rename.HsType.html#ReassociateNegation"><span class="hs-identifier hs-var">ReassociateNegation</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129239"><span class="hs-identifier hs-var">neg_arg</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129237"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129236"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129235"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-1261"></span><span>       </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XNegApp GhcRn -&gt; LHsExpr GhcRn -&gt; SyntaxExpr GhcRn -&gt; HsExpr GhcRn
forall p. XNegApp p -&gt; LHsExpr p -&gt; SyntaxExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-var">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XNegApp GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsExpr GhcRn -&gt; LHsExpr GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129230"><span class="hs-identifier hs-var">loc'</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcRn
</span><a href="#local-6989586621681129231"><span class="hs-identifier hs-var">new_e</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcRn
</span><a href="#local-6989586621681129238"><span class="hs-identifier hs-var">neg_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1262"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1263"></span><span>    </span><span id="local-6989586621681129230"><span class="annot"><span class="annottext">loc' :: SrcSpan
</span><a href="#local-6989586621681129230"><span class="hs-identifier hs-var hs-var">loc'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; SrcSpan
forall a b. Located a -&gt; Located b -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#combineLocs"><span class="hs-identifier hs-var">combineLocs</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129239"><span class="hs-identifier hs-var">neg_arg</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129235"><span class="hs-identifier hs-var">e2</span></a></span><span>
</span><span id="line-1264"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681129234"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129234"><span class="hs-identifier hs-var">nofix_error</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129232"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129232"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier hs-var">negateFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129236"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1265"></span><span>
</span><span id="line-1266"></span><span class="hs-comment">---------------------------</span><span>
</span><span id="line-1267"></span><span class="hs-comment">--      e1 `op` - neg_arg</span><span>
</span><span id="line-1268"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var">mkOpAppRn</span></a></span><span> </span><span class="annot"><span class="annottext">NegationHandling
</span><a href="GHC.Rename.HsType.html#ReassociateNegation"><span class="hs-identifier hs-var">ReassociateNegation</span></a></span><span> </span><span id="local-6989586621681129229"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129229"><span class="hs-identifier hs-var">e1</span></a></span></span><span> </span><span id="local-6989586621681129228"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129228"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span id="local-6989586621681129227"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129227"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span id="local-6989586621681129226"><span class="annot"><span class="annottext">e2 :: LHsExpr GhcRn
</span><a href="#local-6989586621681129226"><span class="hs-identifier hs-var">e2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-type">NegApp</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- NegApp can occur on the right</span><span>
</span><span id="line-1269"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129225"><span class="hs-identifier hs-var">associate_right</span></a></span><span>                        </span><span class="hs-comment">-- We *want* right association</span><span>
</span><span id="line-1270"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129228"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129227"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier hs-var">negateFixity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1271"></span><span>       </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XOpApp GhcRn
-&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; HsExpr GhcRn
forall p.
XOpApp p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-var">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129227"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129229"><span class="hs-identifier hs-var">e1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129228"><span class="hs-identifier hs-var">op1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129226"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1272"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1273"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129225"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129225"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129227"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier hs-var">negateFixity</span></a></span><span>
</span><span id="line-1274"></span><span>
</span><span id="line-1275"></span><span class="hs-comment">---------------------------</span><span>
</span><span id="line-1276"></span><span class="hs-comment">--      Default case</span><span>
</span><span id="line-1277"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpAppRn"><span class="hs-identifier hs-var">mkOpAppRn</span></a></span><span> </span><span class="annot"><span class="annottext">NegationHandling
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129224"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129224"><span class="hs-identifier hs-var">e1</span></a></span></span><span> </span><span id="local-6989586621681129223"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129223"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681129222"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129222"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681129221"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129221"><span class="hs-identifier hs-var">e2</span></a></span></span><span>                  </span><span class="hs-comment">-- Default case, no rearrangment</span><span>
</span><span id="line-1278"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span class="hs-identifier">right_op_ok</span><span> </span><span class="hs-identifier">fix</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unLoc</span><span> </span><span class="hs-identifier">e2</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">e1</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;---&quot;</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">op</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;---&quot;</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">fix</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;---&quot;</span><span> </span><span class="hs-operator">$$</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">e2</span><span class="hs-special">)</span><span>
</span><span id="line-1279"></span><span>    </span><span class="annot"><span class="annottext">HsExpr GhcRn -&gt; RnM (HsExpr GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XOpApp GhcRn
-&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; HsExpr GhcRn
forall p.
XOpApp p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; LHsExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-var">OpApp</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129222"><span class="hs-identifier hs-var">fix</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129224"><span class="hs-identifier hs-var">e1</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129223"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129221"><span class="hs-identifier hs-var">e2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1280"></span><span>
</span><span id="line-1281"></span><span class="hs-keyword">data</span><span> </span><span id="NegationHandling"><span class="annot"><a href="GHC.Rename.HsType.html#NegationHandling"><span class="hs-identifier hs-var">NegationHandling</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ReassociateNegation"><span class="annot"><a href="GHC.Rename.HsType.html#ReassociateNegation"><span class="hs-identifier hs-var">ReassociateNegation</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="KeepNegationIntact"><span class="annot"><a href="GHC.Rename.HsType.html#KeepNegationIntact"><span class="hs-identifier hs-var">KeepNegationIntact</span></a></span></span><span>
</span><span id="line-1282"></span><span>
</span><span id="line-1283"></span><span class="hs-comment">----------------------------</span><span>
</span><span id="line-1284"></span><span>
</span><span id="line-1285"></span><span class="hs-comment">-- | Name of an operator in an operator application or section</span><span>
</span><span id="line-1286"></span><span class="hs-keyword">data</span><span> </span><span id="OpName"><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-var">OpName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NormalOp"><span class="annot"><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>         </span><span class="hs-comment">-- ^ A normal identifier</span><span>
</span><span id="line-1287"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="NegateOp"><span class="annot"><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span></span><span>              </span><span class="hs-comment">-- ^ Prefix negation</span><span>
</span><span id="line-1288"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="UnboundOp"><span class="annot"><a href="GHC.Rename.HsType.html#UnboundOp"><span class="hs-identifier hs-var">UnboundOp</span></a></span></span><span> </span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#OccName"><span class="hs-identifier hs-type">OccName</span></a></span><span>     </span><span class="hs-comment">-- ^ An unbound indentifier</span><span>
</span><span id="line-1289"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="RecFldOp"><span class="annot"><a href="GHC.Rename.HsType.html#RecFldOp"><span class="hs-identifier hs-var">RecFldOp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#AmbiguousFieldOcc"><span class="hs-identifier hs-type">AmbiguousFieldOcc</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1290"></span><span>              </span><span class="hs-comment">-- ^ A (possibly ambiguous) record field occurrence</span><span>
</span><span id="line-1291"></span><span>
</span><span id="line-1292"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681129212"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1293"></span><span>  </span><span id="local-6989586621681129205"><span class="annot"><span class="annottext">ppr :: OpName -&gt; MsgDoc
</span><a href="#local-6989586621681129205"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-type">NormalOp</span></a></span><span> </span><span id="local-6989586621681129204"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129204"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129204"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1294"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#negateName"><span class="hs-identifier hs-var">negateName</span></a></span><span>
</span><span id="line-1295"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#UnboundOp"><span class="hs-identifier hs-type">UnboundOp</span></a></span><span> </span><span id="local-6989586621681129202"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129202"><span class="hs-identifier hs-var">uv</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129202"><span class="hs-identifier hs-var">uv</span></a></span><span>
</span><span id="line-1296"></span><span>  </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#RecFldOp"><span class="hs-identifier hs-type">RecFldOp</span></a></span><span> </span><span id="local-6989586621681129201"><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129201"><span class="hs-identifier hs-var">fld</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129201"><span class="hs-identifier hs-var">fld</span></a></span><span>
</span><span id="line-1297"></span><span>
</span><span id="line-1298"></span><span class="annot"><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-type">get_op</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span>
</span><span id="line-1299"></span><span class="hs-comment">-- An unbound name could be either HsVar or HsUnboundVar</span><span>
</span><span id="line-1300"></span><span class="hs-comment">-- See GHC.Rename.Expr.rnUnboundVar</span><span>
</span><span id="line-1301"></span><span id="get_op"><span class="annot"><span class="annottext">get_op :: LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var hs-var">get_op</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsVar"><span class="hs-identifier hs-type">HsVar</span></a></span><span> </span><span class="annot"><span class="annottext">XVar GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129199"><span class="annot"><span class="annottext">Located (IdP GhcRn)
</span><a href="#local-6989586621681129199"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (IdP GhcRn)
</span><a href="#local-6989586621681129199"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1302"></span><span class="annot"><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsUnboundVar"><span class="hs-identifier hs-type">HsUnboundVar</span></a></span><span> </span><span class="annot"><span class="annottext">XUnboundVar GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129197"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129197"><span class="hs-identifier hs-var">uv</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; OpName
</span><a href="GHC.Rename.HsType.html#UnboundOp"><span class="hs-identifier hs-var">UnboundOp</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129197"><span class="hs-identifier hs-var">uv</span></a></span><span>
</span><span id="line-1303"></span><span class="annot"><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsRecFld"><span class="hs-identifier hs-type">HsRecFld</span></a></span><span> </span><span class="annot"><span class="annottext">XRecFld GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129195"><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129195"><span class="hs-identifier hs-var">fld</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#RecFldOp"><span class="hs-identifier hs-var">RecFldOp</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129195"><span class="hs-identifier hs-var">fld</span></a></span><span>
</span><span id="line-1304"></span><span class="annot"><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span id="local-6989586621681129194"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129194"><span class="hs-identifier hs-var">other</span></a></span></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc -&gt; OpName
forall a. HasCallStack =&gt; String -&gt; MsgDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;get_op&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129194"><span class="hs-identifier hs-var">other</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1305"></span><span>
</span><span id="line-1306"></span><span class="hs-comment">-- Parser left-associates everything, but</span><span>
</span><span id="line-1307"></span><span class="hs-comment">-- derived instances may have correctly-associated things to</span><span>
</span><span id="line-1308"></span><span class="hs-comment">-- in the right operand.  So we just check that the right operand is OK</span><span>
</span><span id="line-1309"></span><span class="annot"><a href="GHC.Rename.HsType.html#right_op_ok"><span class="hs-identifier hs-type">right_op_ok</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1310"></span><span id="right_op_ok"><span class="annot"><span class="annottext">right_op_ok :: Fixity -&gt; HsExpr GhcRn -&gt; Bool
</span><a href="GHC.Rename.HsType.html#right_op_ok"><span class="hs-identifier hs-var hs-var">right_op_ok</span></a></span></span><span> </span><span id="local-6989586621681129192"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129192"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-type">OpApp</span></a></span><span> </span><span id="local-6989586621681129191"><span class="annot"><span class="annottext">XOpApp GhcRn
</span><a href="#local-6989586621681129191"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-1311"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129190"><span class="hs-identifier hs-var">error_please</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129189"><span class="hs-identifier hs-var">associate_right</span></a></span><span>
</span><span id="line-1312"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1313"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681129190"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129190"><span class="hs-identifier hs-var">error_please</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129189"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129189"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129192"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129191"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1314"></span><span class="annot"><a href="GHC.Rename.HsType.html#right_op_ok"><span class="hs-identifier hs-var">right_op_ok</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-1315"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1316"></span><span>
</span><span id="line-1317"></span><span class="hs-comment">-- Parser initially makes negation bind more tightly than any other operator</span><span>
</span><span id="line-1318"></span><span class="hs-comment">-- And &quot;deriving&quot; code should respect this (use HsPar if not)</span><span>
</span><span id="line-1319"></span><span id="local-6989586621681130465"><span class="annot"><a href="GHC.Rename.HsType.html#mkNegAppRn"><span class="hs-identifier hs-type">mkNegAppRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130465"><span class="hs-identifier hs-type">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#SyntaxExpr"><span class="hs-identifier hs-type">SyntaxExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130465"><span class="hs-identifier hs-type">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1320"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPass"><span class="hs-identifier hs-type">GhcPass</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130465"><span class="hs-identifier hs-type">id</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-1321"></span><span id="mkNegAppRn"><span class="annot"><span class="annottext">mkNegAppRn :: forall (id :: Pass).
LHsExpr (GhcPass id)
-&gt; SyntaxExpr (GhcPass id) -&gt; RnM (HsExpr (GhcPass id))
</span><a href="GHC.Rename.HsType.html#mkNegAppRn"><span class="hs-identifier hs-var hs-var">mkNegAppRn</span></a></span></span><span> </span><span id="local-6989586621681129187"><span class="annot"><span class="annottext">LHsExpr (GhcPass id)
</span><a href="#local-6989586621681129187"><span class="hs-identifier hs-var">neg_arg</span></a></span></span><span> </span><span id="local-6989586621681129186"><span class="annot"><span class="annottext">SyntaxExpr (GhcPass id)
</span><a href="#local-6989586621681129186"><span class="hs-identifier hs-var">neg_name</span></a></span></span><span>
</span><span id="line-1322"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not_op_app</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unLoc</span><span> </span><span class="hs-identifier">neg_arg</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1323"></span><span>    </span><span class="annot"><span class="annottext">HsExpr (GhcPass id) -&gt; RnM (HsExpr (GhcPass id))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XNegApp (GhcPass id)
-&gt; LHsExpr (GhcPass id)
-&gt; SyntaxExpr (GhcPass id)
-&gt; HsExpr (GhcPass id)
forall p. XNegApp p -&gt; LHsExpr p -&gt; SyntaxExpr p -&gt; HsExpr p
</span><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-var">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XNegApp (GhcPass id)
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr (GhcPass id)
</span><a href="#local-6989586621681129187"><span class="hs-identifier hs-var">neg_arg</span></a></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr (GhcPass id)
</span><a href="#local-6989586621681129186"><span class="hs-identifier hs-var">neg_name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1324"></span><span>
</span><span id="line-1325"></span><span id="local-6989586621681130463"><span class="annot"><a href="GHC.Rename.HsType.html#not_op_app"><span class="hs-identifier hs-type">not_op_app</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130463"><span class="hs-identifier hs-type">id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-1326"></span><span id="not_op_app"><span class="annot"><span class="annottext">not_op_app :: forall id. HsExpr id -&gt; Bool
</span><a href="GHC.Rename.HsType.html#not_op_app"><span class="hs-identifier hs-var hs-var">not_op_app</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-type">OpApp</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1327"></span><span class="annot"><a href="GHC.Rename.HsType.html#not_op_app"><span class="hs-identifier hs-var">not_op_app</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr id
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1328"></span><span>
</span><span id="line-1329"></span><span class="hs-comment">---------------------------</span><span>
</span><span id="line-1330"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpFormRn"><span class="hs-identifier hs-type">mkOpFormRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsCmdTop"><span class="hs-identifier hs-type">LHsCmdTop</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>            </span><span class="hs-comment">-- Left operand; already rearranged</span><span>
</span><span id="line-1331"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span>     </span><span class="hs-comment">-- Operator and fixity</span><span>
</span><span id="line-1332"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsCmdTop"><span class="hs-identifier hs-type">LHsCmdTop</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>             </span><span class="hs-comment">-- Right operand (not an infix)</span><span>
</span><span id="line-1333"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsCmd"><span class="hs-identifier hs-type">HsCmd</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1334"></span><span>
</span><span id="line-1335"></span><span class="hs-comment">-- (e11 `op1` e12) `op2` e2</span><span>
</span><span id="line-1336"></span><span id="mkOpFormRn"><span class="annot"><span class="annottext">mkOpFormRn :: LHsCmdTop GhcRn
-&gt; LHsExpr GhcRn -&gt; Fixity -&gt; LHsCmdTop GhcRn -&gt; RnM (HsCmd GhcRn)
</span><a href="GHC.Rename.HsType.html#mkOpFormRn"><span class="hs-identifier hs-var hs-var">mkOpFormRn</span></a></span></span><span> </span><span id="local-6989586621681129183"><span class="annot"><span class="annottext">a1 :: LHsCmdTop GhcRn
</span><a href="#local-6989586621681129183"><span class="hs-identifier hs-var">a1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129182"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129182"><span class="hs-identifier hs-var">loc</span></a></span></span><span>
</span><span id="line-1337"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsCmdTop"><span class="hs-identifier hs-type">HsCmdTop</span></a></span><span> </span><span class="annot"><span class="annottext">XCmdTop GhcRn
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-1338"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#HsCmdArrForm"><span class="hs-identifier hs-type">HsCmdArrForm</span></a></span><span> </span><span id="local-6989586621681129179"><span class="annot"><span class="annottext">XCmdArrForm GhcRn
</span><a href="#local-6989586621681129179"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681129178"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129178"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span id="local-6989586621681129177"><span class="annot"><span class="annottext">LexicalFixity
</span><a href="#local-6989586621681129177"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681129176"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129176"><span class="hs-identifier hs-var">fix1</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1339"></span><span>                        </span><span class="hs-special">[</span><span id="local-6989586621681129175"><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129175"><span class="hs-identifier hs-var">a11</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681129174"><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129174"><span class="hs-identifier hs-var">a12</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1340"></span><span>        </span><span id="local-6989586621681129173"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129173"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129172"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129172"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span id="local-6989586621681129171"><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129171"><span class="hs-identifier hs-var">a2</span></a></span></span><span>
</span><span id="line-1341"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129170"><span class="hs-identifier hs-var">nofix_error</span></a></span><span>
</span><span id="line-1342"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129178"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129176"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129173"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129172"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1343"></span><span>       </span><span class="annot"><span class="annottext">HsCmd GhcRn -&gt; RnM (HsCmd GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCmdArrForm GhcRn
-&gt; LHsExpr GhcRn
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop GhcRn]
-&gt; HsCmd GhcRn
forall id.
XCmdArrForm id
-&gt; LHsExpr id
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop id]
-&gt; HsCmd id
</span><a href="GHC.Hs.Expr.html#HsCmdArrForm"><span class="hs-identifier hs-var">HsCmdArrForm</span></a></span><span> </span><span class="annot"><span class="annottext">XCmdArrForm GhcRn
</span><a href="#local-6989586621681129179"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129173"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">LexicalFixity
</span><a href="#local-6989586621681129177"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fixity -&gt; Maybe Fixity
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129172"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129183"><span class="hs-identifier hs-var">a1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129171"><span class="hs-identifier hs-var">a2</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1344"></span><span>
</span><span id="line-1345"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129169"><span class="hs-identifier hs-var">associate_right</span></a></span><span>
</span><span id="line-1346"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621681129168"><span class="annot"><span class="annottext">HsCmd GhcRn
</span><a href="#local-6989586621681129168"><span class="hs-identifier hs-var">new_c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
-&gt; LHsExpr GhcRn -&gt; Fixity -&gt; LHsCmdTop GhcRn -&gt; RnM (HsCmd GhcRn)
</span><a href="GHC.Rename.HsType.html#mkOpFormRn"><span class="hs-identifier hs-var">mkOpFormRn</span></a></span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129174"><span class="hs-identifier hs-var">a12</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129173"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129172"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129171"><span class="hs-identifier hs-var">a2</span></a></span><span>
</span><span id="line-1347"></span><span>       </span><span class="annot"><span class="annottext">HsCmd GhcRn -&gt; RnM (HsCmd GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCmdArrForm GhcRn
-&gt; LHsExpr GhcRn
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop GhcRn]
-&gt; HsCmd GhcRn
forall id.
XCmdArrForm id
-&gt; LHsExpr id
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop id]
-&gt; HsCmd id
</span><a href="GHC.Hs.Expr.html#HsCmdArrForm"><span class="hs-identifier hs-var">HsCmdArrForm</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XCmdArrForm GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129178"><span class="hs-identifier hs-var">op1</span></a></span><span> </span><span class="annot"><span class="annottext">LexicalFixity
</span><a href="#local-6989586621681129177"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fixity -&gt; Maybe Fixity
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129176"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1348"></span><span>               </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129175"><span class="hs-identifier hs-var">a11</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; HsCmdTop GhcRn -&gt; LHsCmdTop GhcRn
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129182"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCmdTop GhcRn -&gt; GenLocated SrcSpan (HsCmd GhcRn) -&gt; HsCmdTop GhcRn
forall p. XCmdTop p -&gt; LHsCmd p -&gt; HsCmdTop p
</span><a href="GHC.Hs.Expr.html#HsCmdTop"><span class="hs-identifier hs-var">HsCmdTop</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; HsCmd GhcRn -&gt; GenLocated SrcSpan (HsCmd GhcRn)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129182"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">HsCmd GhcRn
</span><a href="#local-6989586621681129168"><span class="hs-identifier hs-var">new_c</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1349"></span><span>        </span><span class="hs-comment">-- TODO: locs are wrong</span><span>
</span><span id="line-1350"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1351"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681129170"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129170"><span class="hs-identifier hs-var">nofix_error</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129169"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129169"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129176"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129172"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1352"></span><span>
</span><span id="line-1353"></span><span class="hs-comment">--      Default case</span><span>
</span><span id="line-1354"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkOpFormRn"><span class="hs-identifier hs-var">mkOpFormRn</span></a></span><span> </span><span id="local-6989586621681129167"><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129167"><span class="hs-identifier hs-var">arg1</span></a></span></span><span> </span><span id="local-6989586621681129166"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129166"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681129165"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129165"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span id="local-6989586621681129164"><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129164"><span class="hs-identifier hs-var">arg2</span></a></span></span><span>                     </span><span class="hs-comment">-- Default case, no rearrangment</span><span>
</span><span id="line-1355"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsCmd GhcRn -&gt; RnM (HsCmd GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">XCmdArrForm GhcRn
-&gt; LHsExpr GhcRn
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop GhcRn]
-&gt; HsCmd GhcRn
forall id.
XCmdArrForm id
-&gt; LHsExpr id
-&gt; LexicalFixity
-&gt; Maybe Fixity
-&gt; [LHsCmdTop id]
-&gt; HsCmd id
</span><a href="GHC.Hs.Expr.html#HsCmdArrForm"><span class="hs-identifier hs-var">HsCmdArrForm</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XCmdArrForm GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129166"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">LexicalFixity
</span><a href="GHC.Types.Basic.html#Infix"><span class="hs-identifier hs-var">Infix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fixity -&gt; Maybe Fixity
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129165"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129167"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LHsCmdTop GhcRn
</span><a href="#local-6989586621681129164"><span class="hs-identifier hs-var">arg2</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1356"></span><span>
</span><span id="line-1357"></span><span>
</span><span id="line-1358"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-1359"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier hs-type">mkConOpPatRn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#LPat"><span class="hs-identifier hs-type">LPat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span>
</span><span id="line-1360"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1361"></span><span>
</span><span id="line-1362"></span><span id="mkConOpPatRn"><span class="annot"><span class="annottext">mkConOpPatRn :: GenLocated SrcSpan Name
-&gt; Fixity -&gt; LPat GhcRn -&gt; LPat GhcRn -&gt; RnM (Pat GhcRn)
</span><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier hs-var hs-var">mkConOpPatRn</span></a></span></span><span> </span><span id="local-6989586621681129162"><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129162"><span class="hs-identifier hs-var">op2</span></a></span></span><span> </span><span id="local-6989586621681129161"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129161"><span class="hs-identifier hs-var">fix2</span></a></span></span><span> </span><span id="local-6989586621681129160"><span class="annot"><span class="annottext">p1 :: LPat GhcRn
</span><a href="#local-6989586621681129160"><span class="hs-identifier hs-var">p1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129159"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129159"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-var">NoExtField</span></a></span><span> </span><span id="local-6989586621681129156"><span class="annot"><span class="annottext">Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129156"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span id="local-6989586621681129154"><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129154"><span class="hs-identifier hs-var">p11</span></a></span></span><span> </span><span id="local-6989586621681129153"><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129153"><span class="hs-identifier hs-var">p12</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129152"><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129152"><span class="hs-identifier hs-var">p2</span></a></span></span><span>
</span><span id="line-1363"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129151"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129151"><span class="hs-identifier hs-var">fix1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129156"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1364"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129150"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129150"><span class="hs-identifier hs-var">nofix_error</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129149"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129149"><span class="hs-identifier hs-var">associate_right</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Fixity -&gt; Fixity -&gt; (Bool, Bool)
</span><a href="GHC.Types.Basic.html#compareFixity"><span class="hs-identifier hs-var">compareFixity</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129151"><span class="hs-identifier hs-var">fix1</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129161"><span class="hs-identifier hs-var">fix2</span></a></span><span>
</span><span id="line-1365"></span><span>
</span><span id="line-1366"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129150"><span class="hs-identifier hs-var">nofix_error</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1367"></span><span>                </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129156"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129151"><span class="hs-identifier hs-var">fix1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1368"></span><span>                               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129162"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129161"><span class="hs-identifier hs-var">fix2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1369"></span><span>                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat GhcRn -&gt; RnM (Pat GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcRn -&gt; RnM (Pat GhcRn)) -&gt; Pat GhcRn -&gt; RnM (Pat GhcRn)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-1370"></span><span>                    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcRn
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-1371"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcRn)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129162"><span class="hs-identifier hs-var">op2</span></a></span><span>
</span><span id="line-1372"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConDetails (LPat GhcRn) (HsRecFields GhcRn (LPat GhcRn))
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
-&gt; GenLocated SrcSpan (Pat GhcRn)
-&gt; HsConDetails
     (GenLocated SrcSpan (Pat GhcRn))
     (HsRecFields GhcRn (GenLocated SrcSpan (Pat GhcRn)))
forall arg rec. arg -&gt; arg -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-var">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129160"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129152"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-1373"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1374"></span><span>                </span><span class="hs-special">}</span><span>
</span><span id="line-1375"></span><span>
</span><span id="line-1376"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129149"><span class="hs-identifier hs-var">associate_right</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1377"></span><span>                </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129145"><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129145"><span class="hs-identifier hs-var">new_p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
-&gt; Fixity -&gt; LPat GhcRn -&gt; LPat GhcRn -&gt; RnM (Pat GhcRn)
</span><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier hs-var">mkConOpPatRn</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129162"><span class="hs-identifier hs-var">op2</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129161"><span class="hs-identifier hs-var">fix2</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129153"><span class="hs-identifier hs-var">p12</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129152"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-1378"></span><span>                </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Pat GhcRn -&gt; RnM (Pat GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcRn -&gt; RnM (Pat GhcRn)) -&gt; Pat GhcRn -&gt; RnM (Pat GhcRn)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-1379"></span><span>                    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcRn
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-1380"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcRn)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129156"><span class="hs-identifier hs-var">op1</span></a></span><span>
</span><span id="line-1381"></span><span>                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConDetails (LPat GhcRn) (HsRecFields GhcRn (LPat GhcRn))
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
-&gt; GenLocated SrcSpan (Pat GhcRn)
-&gt; HsConDetails
     (GenLocated SrcSpan (Pat GhcRn))
     (HsRecFields GhcRn (GenLocated SrcSpan (Pat GhcRn)))
forall arg rec. arg -&gt; arg -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-var">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129154"><span class="hs-identifier hs-var">p11</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; Pat GhcRn -&gt; GenLocated SrcSpan (Pat GhcRn)
forall l e. l -&gt; e -&gt; GenLocated l e
</span><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-var">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129159"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129145"><span class="hs-identifier hs-var">new_p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1382"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-1383"></span><span>                </span><span class="hs-special">}</span><span>
</span><span id="line-1384"></span><span>                </span><span class="hs-comment">-- XXX loc right?</span><span>
</span><span id="line-1385"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Pat GhcRn -&gt; RnM (Pat GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcRn -&gt; RnM (Pat GhcRn)) -&gt; Pat GhcRn -&gt; RnM (Pat GhcRn)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-1386"></span><span>                 </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcRn
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-1387"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcRn)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129162"><span class="hs-identifier hs-var">op2</span></a></span><span>
</span><span id="line-1388"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConDetails (LPat GhcRn) (HsRecFields GhcRn (LPat GhcRn))
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
-&gt; GenLocated SrcSpan (Pat GhcRn)
-&gt; HsConDetails
     (GenLocated SrcSpan (Pat GhcRn))
     (HsRecFields GhcRn (GenLocated SrcSpan (Pat GhcRn)))
forall arg rec. arg -&gt; arg -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-var">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129160"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129152"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-1389"></span><span>                 </span><span class="hs-special">}</span><span>
</span><span id="line-1390"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-1391"></span><span>
</span><span id="line-1392"></span><span class="annot"><a href="GHC.Rename.HsType.html#mkConOpPatRn"><span class="hs-identifier hs-var">mkConOpPatRn</span></a></span><span> </span><span id="local-6989586621681129144"><span class="annot"><span class="annottext">GenLocated SrcSpan Name
</span><a href="#local-6989586621681129144"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129143"><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129143"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621681129142"><span class="annot"><span class="annottext">LPat GhcRn
</span><a href="#local-6989586621681129142"><span class="hs-identifier hs-var">p2</span></a></span></span><span>                         </span><span class="hs-comment">-- Default case, no rearrangment</span><span>
</span><span id="line-1393"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">not_op_pat</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">unLoc</span><span> </span><span class="hs-identifier">p2</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1394"></span><span>    </span><span class="annot"><span class="annottext">Pat GhcRn -&gt; RnM (Pat GhcRn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Pat GhcRn -&gt; RnM (Pat GhcRn)) -&gt; Pat GhcRn -&gt; RnM (Pat GhcRn)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ConPat :: forall p.
XConPat p -&gt; Located (ConLikeP p) -&gt; HsConPatDetails p -&gt; Pat p
</span><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span>
</span><span id="line-1395"></span><span>      </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">pat_con_ext :: XConPat GhcRn
</span><a href="GHC.Hs.Pat.html#pat_con_ext"><span class="hs-identifier hs-var">pat_con_ext</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#noExtField"><span class="hs-identifier hs-var">noExtField</span></a></span><span>
</span><span id="line-1396"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_con :: Located (ConLikeP GhcRn)
</span><a href="GHC.Hs.Pat.html#pat_con"><span class="hs-identifier hs-var">pat_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129144"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-1397"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">pat_args :: HsConDetails (LPat GhcRn) (HsRecFields GhcRn (LPat GhcRn))
</span><a href="GHC.Hs.Pat.html#pat_args"><span class="hs-identifier hs-var">pat_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
-&gt; GenLocated SrcSpan (Pat GhcRn)
-&gt; HsConDetails
     (GenLocated SrcSpan (Pat GhcRn))
     (HsRecFields GhcRn (GenLocated SrcSpan (Pat GhcRn)))
forall arg rec. arg -&gt; arg -&gt; HsConDetails arg rec
</span><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-var">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129143"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (Pat GhcRn)
LPat GhcRn
</span><a href="#local-6989586621681129142"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-1398"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-1399"></span><span>
</span><span id="line-1400"></span><span class="annot"><a href="GHC.Rename.HsType.html#not_op_pat"><span class="hs-identifier hs-type">not_op_pat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1401"></span><span id="not_op_pat"><span class="annot"><span class="annottext">not_op_pat :: Pat GhcRn -&gt; Bool
</span><a href="GHC.Rename.HsType.html#not_op_pat"><span class="hs-identifier hs-var hs-var">not_op_pat</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-var">NoExtField</span></a></span><span> </span><span class="annot"><span class="annottext">Located (ConLikeP GhcRn)
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1402"></span><span class="annot"><a href="GHC.Rename.HsType.html#not_op_pat"><span class="hs-identifier hs-var">not_op_pat</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcRn
</span><span class="hs-identifier">_</span></span><span>                                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1403"></span><span>
</span><span id="line-1404"></span><span class="hs-comment">--------------------------------------</span><span>
</span><span id="line-1405"></span><span id="local-6989586621681130441"><span class="annot"><a href="GHC.Rename.HsType.html#checkPrecMatch"><span class="hs-identifier hs-type">checkPrecMatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#MatchGroup"><span class="hs-identifier hs-type">MatchGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130441"><span class="hs-identifier hs-type">body</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-1406"></span><span>  </span><span class="hs-comment">-- Check precedence of a function binding written infix</span><span>
</span><span id="line-1407"></span><span>  </span><span class="hs-comment">--   eg  a `op` b `C` c = ...</span><span>
</span><span id="line-1408"></span><span>  </span><span class="hs-comment">-- See comments with rnExpr (OpApp ...) about &quot;deriving&quot;</span><span>
</span><span id="line-1409"></span><span>
</span><span id="line-1410"></span><span id="checkPrecMatch"><span class="annot"><span class="annottext">checkPrecMatch :: forall body. Name -&gt; MatchGroup GhcRn body -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPrecMatch"><span class="hs-identifier hs-var hs-var">checkPrecMatch</span></a></span></span><span> </span><span id="local-6989586621681129136"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129136"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#MG"><span class="hs-identifier hs-type">MG</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_alts :: forall p body. MatchGroup p body -&gt; Located [LMatch p body]
</span><a href="GHC.Hs.Expr.html#mg_alts"><span class="hs-identifier hs-var">mg_alts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129133"><span class="annot"><span class="annottext">[LMatch GhcRn body]
</span><a href="#local-6989586621681129133"><span class="hs-identifier hs-var">ms</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1411"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LMatch GhcRn body -&gt; TcRn ()) -&gt; [LMatch GhcRn body] -&gt; TcRn ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span> </span><span class="annot"><span class="annottext">LMatch GhcRn body -&gt; TcRn ()
</span><a href="#local-6989586621681129131"><span class="hs-identifier hs-var">check</span></a></span><span> </span><span class="annot"><span class="annottext">[LMatch GhcRn body]
</span><a href="#local-6989586621681129133"><span class="hs-identifier hs-var">ms</span></a></span><span>
</span><span id="line-1412"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1413"></span><span>    </span><span id="local-6989586621681129131"><span class="annot"><span class="annottext">check :: LMatch GhcRn body -&gt; TcRn ()
</span><a href="#local-6989586621681129131"><span class="hs-identifier hs-var hs-var">check</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Expr.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">m_pats :: forall p body. Match p body -&gt; [LPat p]
</span><a href="GHC.Hs.Expr.html#m_pats"><span class="hs-identifier hs-var">m_pats</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129128"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129128"><span class="hs-identifier hs-var">l1</span></a></span></span><span> </span><span id="local-6989586621681129127"><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129127"><span class="hs-identifier hs-var">p1</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1414"></span><span>                               </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129126"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129126"><span class="hs-identifier hs-var">l2</span></a></span></span><span> </span><span id="local-6989586621681129125"><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129125"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1415"></span><span>                               </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[LPat GhcRn]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1416"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; TcRn () -&gt; TcRn ()
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcSpan -&gt; SrcSpan -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#combineSrcSpans"><span class="hs-identifier hs-var">combineSrcSpans</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129128"><span class="hs-identifier hs-var">l1</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129126"><span class="hs-identifier hs-var">l2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1417"></span><span>        </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Pat GhcRn -&gt; Bool -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPrec"><span class="hs-identifier hs-var">checkPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129136"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129127"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1418"></span><span>           </span><span class="annot"><span class="annottext">Name -&gt; Pat GhcRn -&gt; Bool -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPrec"><span class="hs-identifier hs-var">checkPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129136"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">Pat GhcRn
</span><a href="#local-6989586621681129125"><span class="hs-identifier hs-var">p2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1419"></span><span>
</span><span id="line-1420"></span><span>    </span><span class="annot"><a href="#local-6989586621681129131"><span class="hs-identifier hs-var">check</span></a></span><span> </span><span class="annot"><span class="annottext">LMatch GhcRn body
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1421"></span><span>        </span><span class="hs-comment">-- This can happen.  Consider</span><span>
</span><span id="line-1422"></span><span>        </span><span class="hs-comment">--      a `op` True = ...</span><span>
</span><span id="line-1423"></span><span>        </span><span class="hs-comment">--      op          = ...</span><span>
</span><span id="line-1424"></span><span>        </span><span class="hs-comment">-- The infix flag comes from the first binding of the group</span><span>
</span><span id="line-1425"></span><span>        </span><span class="hs-comment">-- but the second eqn has no args (an error, but not discovered</span><span>
</span><span id="line-1426"></span><span>        </span><span class="hs-comment">-- until the type checker).  So we don't want to crash on the</span><span>
</span><span id="line-1427"></span><span>        </span><span class="hs-comment">-- second eqn.</span><span>
</span><span id="line-1428"></span><span>
</span><span id="line-1429"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkPrec"><span class="hs-identifier hs-type">checkPrec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Pat.html#Pat"><span class="hs-identifier hs-type">Pat</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.IOEnv.html#IOEnv"><span class="hs-identifier hs-type">IOEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Tc.Types.html#Env"><span class="hs-identifier hs-type">Env</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcLclEnv"><span class="hs-identifier hs-type">TcLclEnv</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1430"></span><span id="checkPrec"><span class="annot"><span class="annottext">checkPrec :: Name -&gt; Pat GhcRn -&gt; Bool -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkPrec"><span class="hs-identifier hs-var hs-var">checkPrec</span></a></span></span><span> </span><span id="local-6989586621681129123"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129123"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Pat.html#ConPat"><span class="hs-identifier hs-type">ConPat</span></a></span><span> </span><span class="annot"><span class="annottext">NoExtField
XConPat GhcRn
</span><a href="GHC.Hs.Extension.html#NoExtField"><span class="hs-identifier hs-var">NoExtField</span></a></span><span> </span><span id="local-6989586621681129122"><span class="annot"><span class="annottext">Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129122"><span class="hs-identifier hs-var">op1</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#InfixCon"><span class="hs-identifier hs-type">InfixCon</span></a></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LPat GhcRn
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129121"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129121"><span class="hs-identifier hs-var">right</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1431"></span><span>    </span><span id="local-6989586621681129120"><span class="annot"><span class="annottext">op_fix :: Fixity
</span><a href="#local-6989586621681129120"><span class="hs-identifier hs-var">op_fix</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129118"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129118"><span class="hs-identifier hs-var">op_prec</span></a></span></span><span>  </span><span id="local-6989586621681129117"><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129117"><span class="hs-identifier hs-var">op_dir</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129123"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-1432"></span><span>    </span><span id="local-6989586621681129116"><span class="annot"><span class="annottext">op1_fix :: Fixity
</span><a href="#local-6989586621681129116"><span class="hs-identifier hs-var">op1_fix</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129115"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129115"><span class="hs-identifier hs-var">op1_prec</span></a></span></span><span> </span><span id="local-6989586621681129114"><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129114"><span class="hs-identifier hs-var">op1_dir</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129122"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1433"></span><span>    </span><span class="hs-keyword">let</span><span>
</span><span id="line-1434"></span><span>        </span><span id="local-6989586621681129113"><span class="annot"><span class="annottext">inf_ok :: Bool
</span><a href="#local-6989586621681129113"><span class="hs-identifier hs-var hs-var">inf_ok</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129115"><span class="hs-identifier hs-var">op1_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129118"><span class="hs-identifier hs-var">op_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span>
</span><span id="line-1435"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129115"><span class="hs-identifier hs-var">op1_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129118"><span class="hs-identifier hs-var">op_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span>
</span><span id="line-1436"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129114"><span class="hs-identifier hs-var">op1_dir</span></a></span><span> </span><span class="annot"><span class="annottext">FixityDirection -&gt; FixityDirection -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="GHC.Types.Basic.html#InfixR"><span class="hs-identifier hs-var">InfixR</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129117"><span class="hs-identifier hs-var">op_dir</span></a></span><span> </span><span class="annot"><span class="annottext">FixityDirection -&gt; FixityDirection -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="GHC.Types.Basic.html#InfixR"><span class="hs-identifier hs-var">InfixR</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129121"><span class="hs-identifier hs-var">right</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span>
</span><span id="line-1437"></span><span>                   </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129114"><span class="hs-identifier hs-var">op1_dir</span></a></span><span> </span><span class="annot"><span class="annottext">FixityDirection -&gt; FixityDirection -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="GHC.Types.Basic.html#InfixL"><span class="hs-identifier hs-var">InfixL</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129117"><span class="hs-identifier hs-var">op_dir</span></a></span><span> </span><span class="annot"><span class="annottext">FixityDirection -&gt; FixityDirection -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="GHC.Types.Basic.html#InfixL"><span class="hs-identifier hs-var">InfixL</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129121"><span class="hs-identifier hs-var">right</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1438"></span><span>
</span><span id="line-1439"></span><span>        </span><span id="local-6989586621681129109"><span class="annot"><span class="annottext">info :: (OpName, Fixity)
</span><a href="#local-6989586621681129109"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129123"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">,</span><span>          </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129120"><span class="hs-identifier hs-var">op_fix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1440"></span><span>        </span><span id="local-6989586621681129108"><span class="annot"><span class="annottext">info1 :: (OpName, Fixity)
</span><a href="#local-6989586621681129108"><span class="hs-identifier hs-var hs-var">info1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OpName
</span><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-var">NormalOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan Name -&gt; Name
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan Name
Located (ConLikeP GhcRn)
</span><a href="#local-6989586621681129122"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129116"><span class="hs-identifier hs-var">op1_fix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1441"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681129107"><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129107"><span class="hs-identifier hs-var">infol</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129106"><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129106"><span class="hs-identifier hs-var">infor</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129121"><span class="hs-identifier hs-var">right</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129109"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129108"><span class="hs-identifier hs-var">info1</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129108"><span class="hs-identifier hs-var">info1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129109"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1442"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681129113"><span class="hs-identifier hs-var">inf_ok</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var">precParseErr</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129107"><span class="hs-identifier hs-var">infol</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129106"><span class="hs-identifier hs-var">infor</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1443"></span><span>
</span><span id="line-1444"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkPrec"><span class="hs-identifier hs-var">checkPrec</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Pat GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>
</span><span id="line-1445"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1446"></span><span>
</span><span id="line-1447"></span><span class="hs-comment">-- Check precedence of (arg op) or (op arg) respectively</span><span>
</span><span id="line-1448"></span><span class="hs-comment">-- If arg is itself an operator application, then either</span><span>
</span><span id="line-1449"></span><span class="hs-comment">--   (a) its precedence must be higher than that of op</span><span>
</span><span id="line-1450"></span><span class="hs-comment">--   (b) its precedency &amp; associativity must be the same as that of op</span><span>
</span><span id="line-1451"></span><span class="annot"><a href="GHC.Rename.HsType.html#checkSectionPrec"><span class="hs-identifier hs-type">checkSectionPrec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#FixityDirection"><span class="hs-identifier hs-type">FixityDirection</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-1452"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#LHsExpr"><span class="hs-identifier hs-type">LHsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1453"></span><span id="checkSectionPrec"><span class="annot"><span class="annottext">checkSectionPrec :: FixityDirection
-&gt; HsExpr GhcPs -&gt; LHsExpr GhcRn -&gt; LHsExpr GhcRn -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#checkSectionPrec"><span class="hs-identifier hs-var hs-var">checkSectionPrec</span></a></span></span><span> </span><span id="local-6989586621681129105"><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129105"><span class="hs-identifier hs-var">direction</span></a></span></span><span> </span><span id="local-6989586621681129104"><span class="annot"><span class="annottext">HsExpr GhcPs
</span><a href="#local-6989586621681129104"><span class="hs-identifier hs-var">section</span></a></span></span><span> </span><span id="local-6989586621681129103"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129103"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681129102"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129102"><span class="hs-identifier hs-var">arg</span></a></span></span><span>
</span><span id="line-1454"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; HsExpr GhcRn
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129102"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1455"></span><span>        </span><span class="annot"><a href="GHC.Hs.Expr.html#OpApp"><span class="hs-identifier hs-type">OpApp</span></a></span><span> </span><span id="local-6989586621681129101"><span class="annot"><span class="annottext">XOpApp GhcRn
</span><a href="#local-6989586621681129101"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129100"><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129100"><span class="hs-identifier hs-var">op'</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Fixity -&gt; TcRn ()
</span><a href="#local-6989586621681129099"><span class="hs-identifier hs-var">go_for_it</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129100"><span class="hs-identifier hs-var">op'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Fixity
XOpApp GhcRn
</span><a href="#local-6989586621681129101"><span class="hs-identifier hs-var">fix</span></a></span><span>
</span><span id="line-1456"></span><span>        </span><span class="annot"><a href="GHC.Hs.Expr.html#NegApp"><span class="hs-identifier hs-type">NegApp</span></a></span><span> </span><span class="annot"><span class="annottext">XNegApp GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SyntaxExpr GhcRn
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Fixity -&gt; TcRn ()
</span><a href="#local-6989586621681129099"><span class="hs-identifier hs-var">go_for_it</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span>     </span><span class="annot"><span class="annottext">Fixity
</span><a href="GHC.Types.Basic.html#negateFixity"><span class="hs-identifier hs-var">negateFixity</span></a></span><span>
</span><span id="line-1457"></span><span>        </span><span class="annot"><span class="annottext">HsExpr GhcRn
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1458"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1459"></span><span>    </span><span id="local-6989586621681129098"><span class="annot"><span class="annottext">op_name :: OpName
</span><a href="#local-6989586621681129098"><span class="hs-identifier hs-var hs-var">op_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129103"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-1460"></span><span>    </span><span id="local-6989586621681129099"><span class="annot"><span class="annottext">go_for_it :: OpName -&gt; Fixity -&gt; TcRn ()
</span><a href="#local-6989586621681129099"><span class="hs-identifier hs-var hs-var">go_for_it</span></a></span></span><span> </span><span id="local-6989586621681129097"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129097"><span class="hs-identifier hs-var">arg_op</span></a></span></span><span> </span><span id="local-6989586621681129096"><span class="annot"><span class="annottext">arg_fix :: Fixity
</span><a href="#local-6989586621681129096"><span class="hs-identifier hs-var">arg_fix</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129095"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129095"><span class="hs-identifier hs-var">arg_prec</span></a></span></span><span> </span><span id="local-6989586621681129094"><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129094"><span class="hs-identifier hs-var">assoc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1461"></span><span>          </span><span id="local-6989586621681129093"><span class="annot"><span class="annottext">op_fix :: Fixity
</span><a href="#local-6989586621681129093"><span class="hs-identifier hs-var">op_fix</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129092"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129092"><span class="hs-identifier hs-var">op_prec</span></a></span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">OpName -&gt; RnM Fixity
</span><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-var">lookupFixityOp</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129098"><span class="hs-identifier hs-var">op_name</span></a></span><span>
</span><span id="line-1462"></span><span>          </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129092"><span class="hs-identifier hs-var">op_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129095"><span class="hs-identifier hs-var">arg_prec</span></a></span><span>
</span><span id="line-1463"></span><span>                  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129092"><span class="hs-identifier hs-var">op_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681129095"><span class="hs-identifier hs-var">arg_prec</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129105"><span class="hs-identifier hs-var">direction</span></a></span><span> </span><span class="annot"><span class="annottext">FixityDirection -&gt; FixityDirection -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">FixityDirection
</span><a href="#local-6989586621681129094"><span class="hs-identifier hs-var">assoc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1464"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; (OpName, Fixity) -&gt; HsExpr GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#sectionPrecErr"><span class="hs-identifier hs-var">sectionPrecErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsExpr GhcRn -&gt; OpName
</span><a href="GHC.Rename.HsType.html#get_op"><span class="hs-identifier hs-var">get_op</span></a></span><span> </span><span class="annot"><span class="annottext">LHsExpr GhcRn
</span><a href="#local-6989586621681129103"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129093"><span class="hs-identifier hs-var">op_fix</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1465"></span><span>                                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129097"><span class="hs-identifier hs-var">arg_op</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129096"><span class="hs-identifier hs-var">arg_fix</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HsExpr GhcPs
</span><a href="#local-6989586621681129104"><span class="hs-identifier hs-var">section</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1466"></span><span>
</span><span id="line-1467"></span><span class="hs-comment">-- | Look up the fixity for an operator name.  Be careful to use</span><span>
</span><span id="line-1468"></span><span class="hs-comment">-- 'lookupFieldFixityRn' for (possibly ambiguous) record fields</span><span>
</span><span id="line-1469"></span><span class="hs-comment">-- (see #13132).</span><span>
</span><span id="line-1470"></span><span class="annot"><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-type">lookupFixityOp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span>
</span><span id="line-1471"></span><span id="lookupFixityOp"><span class="annot"><span class="annottext">lookupFixityOp :: OpName -&gt; RnM Fixity
</span><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-var hs-var">lookupFixityOp</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-type">NormalOp</span></a></span><span> </span><span id="local-6989586621681129089"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129089"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129089"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1472"></span><span class="annot"><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-var">lookupFixityOp</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Builtin.Names.html#negateName"><span class="hs-identifier hs-var">negateName</span></a></span><span>
</span><span id="line-1473"></span><span class="annot"><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-var">lookupFixityOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#UnboundOp"><span class="hs-identifier hs-type">UnboundOp</span></a></span><span> </span><span id="local-6989586621681129088"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129088"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFixityRn"><span class="hs-identifier hs-var">lookupFixityRn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; Name
</span><a href="GHC.Builtin.Names.html#mkUnboundName"><span class="hs-identifier hs-var">mkUnboundName</span></a></span><span> </span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681129088"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1474"></span><span class="annot"><a href="GHC.Rename.HsType.html#lookupFixityOp"><span class="hs-identifier hs-var">lookupFixityOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#RecFldOp"><span class="hs-identifier hs-type">RecFldOp</span></a></span><span> </span><span id="local-6989586621681129086"><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129086"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn -&gt; RnM Fixity
</span><a href="GHC.Rename.Fixity.html#lookupFieldFixityRn"><span class="hs-identifier hs-var">lookupFieldFixityRn</span></a></span><span> </span><span class="annot"><span class="annottext">AmbiguousFieldOcc GhcRn
</span><a href="#local-6989586621681129086"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-1475"></span><span>
</span><span id="line-1476"></span><span>
</span><span id="line-1477"></span><span class="hs-comment">-- Precedence-related error messages</span><span>
</span><span id="line-1478"></span><span>
</span><span id="line-1479"></span><span class="annot"><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-type">precParseErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1480"></span><span id="precParseErr"><span class="annot"><span class="annottext">precParseErr :: (OpName, Fixity) -&gt; (OpName, Fixity) -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#precParseErr"><span class="hs-identifier hs-var hs-var">precParseErr</span></a></span></span><span> </span><span id="local-6989586621681129085"><span class="annot"><span class="annottext">op1 :: (OpName, Fixity)
</span><a href="#local-6989586621681129085"><span class="hs-identifier hs-var">op1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621681129084"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129084"><span class="hs-identifier hs-var">n1</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129083"><span class="annot"><span class="annottext">op2 :: (OpName, Fixity)
</span><a href="#local-6989586621681129083"><span class="hs-identifier hs-var">op2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621681129082"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129082"><span class="hs-identifier hs-var">n2</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-1481"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129084"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129082"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-1482"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- Avoid error cascade</span><span>
</span><span id="line-1483"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1484"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Precedence parsing error&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1485"></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cannot mix&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-var">ppr_opfix</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129085"><span class="hs-identifier hs-var">op1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;and&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1486"></span><span>               </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-var">ppr_opfix</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129083"><span class="hs-identifier hs-var">op2</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1487"></span><span>               </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in the same infix expression&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1488"></span><span>
</span><span id="line-1489"></span><span class="annot"><a href="GHC.Rename.HsType.html#sectionPrecErr"><span class="hs-identifier hs-type">sectionPrecErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Expr.html#HsExpr"><span class="hs-identifier hs-type">HsExpr</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1490"></span><span id="sectionPrecErr"><span class="annot"><span class="annottext">sectionPrecErr :: (OpName, Fixity) -&gt; (OpName, Fixity) -&gt; HsExpr GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#sectionPrecErr"><span class="hs-identifier hs-var hs-var">sectionPrecErr</span></a></span></span><span> </span><span id="local-6989586621681129078"><span class="annot"><span class="annottext">op :: (OpName, Fixity)
</span><a href="#local-6989586621681129078"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621681129077"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129077"><span class="hs-identifier hs-var">n1</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129076"><span class="annot"><span class="annottext">arg_op :: (OpName, Fixity)
</span><a href="#local-6989586621681129076"><span class="hs-identifier hs-var">arg_op</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621681129075"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129075"><span class="hs-identifier hs-var">n2</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129074"><span class="annot"><span class="annottext">HsExpr GhcPs
</span><a href="#local-6989586621681129074"><span class="hs-identifier hs-var">section</span></a></span></span><span>
</span><span id="line-1491"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129077"><span class="hs-identifier hs-var">n1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">OpName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129075"><span class="hs-identifier hs-var">n2</span></a></span><span>
</span><span id="line-1492"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; TcRn ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- Avoid error cascade</span><span>
</span><span id="line-1493"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1494"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The operator&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-var">ppr_opfix</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129078"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;of a section&quot;</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1495"></span><span>         </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;must have lower precedence than that of the operand,&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-1496"></span><span>                      </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;namely&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity) -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-var">ppr_opfix</span></a></span><span> </span><span class="annot"><span class="annottext">(OpName, Fixity)
</span><a href="#local-6989586621681129076"><span class="hs-identifier hs-var">arg_op</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-1497"></span><span>         </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in the section:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsExpr GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsExpr GhcPs
</span><a href="#local-6989586621681129074"><span class="hs-identifier hs-var">section</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1498"></span><span>
</span><span id="line-1499"></span><span class="annot"><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-type">is_unbound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1500"></span><span id="is_unbound"><span class="annot"><span class="annottext">is_unbound :: OpName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var hs-var">is_unbound</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#NormalOp"><span class="hs-identifier hs-type">NormalOp</span></a></span><span> </span><span id="local-6989586621681129073"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129073"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Builtin.Names.html#isUnboundName"><span class="hs-identifier hs-var">isUnboundName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681129073"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-1501"></span><span class="annot"><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#UnboundOp"><span class="hs-identifier hs-type">UnboundOp</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1502"></span><span class="annot"><a href="GHC.Rename.HsType.html#is_unbound"><span class="hs-identifier hs-var">is_unbound</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1503"></span><span>
</span><span id="line-1504"></span><span class="annot"><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-type">ppr_opfix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Rename.HsType.html#OpName"><span class="hs-identifier hs-type">OpName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Fixity"><span class="hs-identifier hs-type">Fixity</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1505"></span><span id="ppr_opfix"><span class="annot"><span class="annottext">ppr_opfix :: (OpName, Fixity) -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#ppr_opfix"><span class="hs-identifier hs-var hs-var">ppr_opfix</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681129071"><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129071"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681129070"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129070"><span class="hs-identifier hs-var">fixity</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129069"><span class="hs-identifier hs-var">pp_op</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#brackets"><span class="hs-identifier hs-var">brackets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Fixity -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681129070"><span class="hs-identifier hs-var">fixity</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1506"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-1507"></span><span>     </span><span id="local-6989586621681129069"><span class="annot"><span class="annottext">pp_op :: MsgDoc
</span><a href="#local-6989586621681129069"><span class="hs-identifier hs-var hs-var">pp_op</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="GHC.Rename.HsType.html#NegateOp"><span class="hs-identifier hs-var">NegateOp</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129071"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;prefix `-'&quot;</span></span><span>
</span><span id="line-1508"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">OpName
</span><a href="#local-6989586621681129071"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1509"></span><span>
</span><span id="line-1510"></span><span>
</span><span id="line-1511"></span><span class="hs-comment">{- *****************************************************
*                                                      *
                 Errors
*                                                      *
***************************************************** -}</span><span>
</span><span id="line-1516"></span><span>
</span><span id="line-1517"></span><span class="annot"><a href="GHC.Rename.HsType.html#unexpectedPatSigTypeErr"><span class="hs-identifier hs-type">unexpectedPatSigTypeErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsPatSigType"><span class="hs-identifier hs-type">HsPatSigType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1518"></span><span id="unexpectedPatSigTypeErr"><span class="annot"><span class="annottext">unexpectedPatSigTypeErr :: HsPatSigType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#unexpectedPatSigTypeErr"><span class="hs-identifier hs-var hs-var">unexpectedPatSigTypeErr</span></a></span></span><span> </span><span id="local-6989586621681129067"><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681129067"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1519"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal type signature:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsPatSigType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsPatSigType GhcPs
</span><a href="#local-6989586621681129067"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1520"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Type signatures are only allowed in patterns with ScopedTypeVariables&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1521"></span><span>
</span><span id="line-1522"></span><span class="annot"><a href="GHC.Rename.HsType.html#badKindSigErr"><span class="hs-identifier hs-type">badKindSigErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1523"></span><span id="badKindSigErr"><span class="annot"><span class="annottext">badKindSigErr :: HsDocContext -&gt; LHsType GhcPs -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#badKindSigErr"><span class="hs-identifier hs-var hs-var">badKindSigErr</span></a></span></span><span> </span><span id="local-6989586621681129065"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129065"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129064"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129064"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129063"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129063"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1524"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; TcRn () -&gt; TcRn ()
forall a. SrcSpan -&gt; TcRn a -&gt; TcRn a
</span><a href="GHC.Tc.Utils.Monad.html#setSrcSpan"><span class="hs-identifier hs-var">setSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129064"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addErr"><span class="hs-identifier hs-var">addErr</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1525"></span><span>    </span><span class="annot"><span class="annottext">HsDocContext -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#withHsDocContext"><span class="hs-identifier hs-var">withHsDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129065"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; MsgDoc) -&gt; MsgDoc -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1526"></span><span>    </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal kind signature:&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129063"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1527"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Perhaps you intended to use KindSignatures&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1528"></span><span>
</span><span id="line-1529"></span><span class="annot"><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-type">dataKindsErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#RnTyKiEnv"><span class="hs-identifier hs-type">RnTyKiEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsType"><span class="hs-identifier hs-type">HsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-1530"></span><span id="dataKindsErr"><span class="annot"><span class="annottext">dataKindsErr :: RnTyKiEnv -&gt; HsType GhcPs -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#dataKindsErr"><span class="hs-identifier hs-var hs-var">dataKindsErr</span></a></span></span><span> </span><span id="local-6989586621681129062"><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129062"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681129061"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129061"><span class="hs-identifier hs-var">thing</span></a></span></span><span>
</span><span id="line-1531"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="#local-6989586621681129060"><span class="hs-identifier hs-var">pp_what</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsType GhcPs -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129061"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1532"></span><span>       </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Perhaps you intended to use DataKinds&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1533"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1534"></span><span>    </span><span id="local-6989586621681129060"><span class="annot"><span class="annottext">pp_what :: MsgDoc
</span><a href="#local-6989586621681129060"><span class="hs-identifier hs-var hs-var">pp_what</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv -&gt; Bool
</span><a href="GHC.Rename.HsType.html#isRnKindLevel"><span class="hs-identifier hs-var">isRnKindLevel</span></a></span><span> </span><span class="annot"><span class="annottext">RnTyKiEnv
</span><a href="#local-6989586621681129062"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;kind&quot;</span></span><span>
</span><span id="line-1535"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;type&quot;</span></span><span>
</span><span id="line-1536"></span><span>
</span><span id="line-1537"></span><span id="local-6989586621681130508"><span class="annot"><a href="GHC.Rename.HsType.html#warnUnusedForAll"><span class="hs-identifier hs-type">warnUnusedForAll</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#OutputableBndrFlag"><span class="hs-identifier hs-type">OutputableBndrFlag</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130508"><span class="hs-identifier hs-type">flag</span></a></span><span>
</span><span id="line-1538"></span><span>                 </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.Utils.html#HsDocContext"><span class="hs-identifier hs-type">HsDocContext</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130508"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcRn"><span class="hs-identifier hs-type">GhcRn</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#FreeVars"><span class="hs-identifier hs-type">FreeVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcM"><span class="hs-identifier hs-type">TcM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-1539"></span><span id="warnUnusedForAll"><span class="annot"><span class="annottext">warnUnusedForAll :: forall flag.
OutputableBndrFlag flag =&gt;
HsDocContext -&gt; LHsTyVarBndr flag GhcRn -&gt; FreeVars -&gt; TcRn ()
</span><a href="GHC.Rename.HsType.html#warnUnusedForAll"><span class="hs-identifier hs-var hs-var">warnUnusedForAll</span></a></span></span><span> </span><span id="local-6989586621681129053"><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129053"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span id="local-6989586621681129052"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129052"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621681129051"><span class="annot"><span class="annottext">HsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129051"><span class="hs-identifier hs-var">tv</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129050"><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129050"><span class="hs-identifier hs-var">used_names</span></a></span></span><span>
</span><span id="line-1540"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">WarningFlag -&gt; TcRn () -&gt; TcRn ()
forall gbl lcl.
WarningFlag -&gt; TcRnIf gbl lcl () -&gt; TcRnIf gbl lcl ()
</span><a href="GHC.Tc.Utils.Monad.html#whenWOptM"><span class="hs-identifier hs-var">whenWOptM</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnUnusedForalls"><span class="hs-identifier hs-var">Opt_WarnUnusedForalls</span></a></span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1541"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; TcRn () -&gt; TcRn ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsTyVarBndr flag GhcRn -&gt; IdP GhcRn
forall flag (p :: Pass).
HsTyVarBndr flag (GhcPass p) -&gt; IdP (GhcPass p)
</span><a href="GHC.Hs.Type.html#hsTyVarName"><span class="hs-identifier hs-var">hsTyVarName</span></a></span><span> </span><span class="annot"><span class="annottext">HsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129051"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; FreeVars -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-operator hs-var">`elemNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FreeVars
</span><a href="#local-6989586621681129050"><span class="hs-identifier hs-var">used_names</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(TcRn () -&gt; TcRn ()) -&gt; TcRn () -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1542"></span><span>    </span><span class="annot"><span class="annottext">WarnReason -&gt; SrcSpan -&gt; MsgDoc -&gt; TcRn ()
</span><a href="GHC.Tc.Utils.Monad.html#addWarnAt"><span class="hs-identifier hs-var">addWarnAt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WarningFlag -&gt; WarnReason
</span><a href="GHC.Driver.Flags.html#Reason"><span class="hs-identifier hs-var">Reason</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnUnusedForalls"><span class="hs-identifier hs-var">Opt_WarnUnusedForalls</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621681129052"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; TcRn ()) -&gt; MsgDoc -&gt; TcRn ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1543"></span><span>    </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unused quantified type variable&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsTyVarBndr flag GhcRn -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">HsTyVarBndr flag GhcRn
</span><a href="#local-6989586621681129051"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1544"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">HsDocContext -&gt; MsgDoc
</span><a href="GHC.Rename.Utils.html#inHsDocContext"><span class="hs-identifier hs-var">inHsDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">HsDocContext
</span><a href="#local-6989586621681129053"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1545"></span><span>
</span><span id="line-1546"></span><span id="local-6989586621681130550"><span class="annot"><a href="GHC.Rename.HsType.html#opTyErr"><span class="hs-identifier hs-type">opTyErr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130550"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681130550"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-1547"></span><span id="opTyErr"><span class="annot"><span class="annottext">opTyErr :: forall a. Outputable a =&gt; RdrName -&gt; a -&gt; MsgDoc
</span><a href="GHC.Rename.HsType.html#opTyErr"><span class="hs-identifier hs-var hs-var">opTyErr</span></a></span></span><span> </span><span id="local-6989586621681129041"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129041"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681129040"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129040"><span class="hs-identifier hs-var">overall_ty</span></a></span></span><span>
</span><span id="line-1548"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Illegal operator&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RdrName -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129041"><span class="hs-identifier hs-var">op</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in type&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; MsgDoc
forall a. Outputable a =&gt; a -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681129040"><span class="hs-identifier hs-var">overall_ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1549"></span><span>         </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Use TypeOperators to allow operators in types&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1550"></span><span>
</span><span id="line-1551"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
      Finding the free type variables of a (HsType RdrName)
*                                                                      *
************************************************************************


Note [Kind and type-variable binders]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In a type signature we may implicitly bind type/kind variables. For example:
  *   f :: a -&gt; a
      f = ...
    Here we need to find the free type variables of (a -&gt; a),
    so that we know what to quantify

  *   class C (a :: k) where ...
    This binds 'k' in ..., as well as 'a'

  *   f (x :: a -&gt; [a]) = ....
    Here we bind 'a' in ....

  *   f (x :: T a -&gt; T (b :: k)) = ...
    Here we bind both 'a' and the kind variable 'k'

  *   type instance F (T (a :: Maybe k)) = ...a...k...
    Here we want to constrain the kind of 'a', and bind 'k'.

To do that, we need to walk over a type and find its free type/kind variables.
We preserve the left-to-right order of each variable occurrence.
See Note [Ordering of implicit variables].

It is common for lists of free type variables to contain duplicates. For
example, in `f :: a -&gt; a`, the free type variable list is [a, a]. When these
implicitly bound variables are brought into scope (with rnImplicitBndrs),
duplicates are removed with nubL.

Note [Ordering of implicit variables]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since the advent of -XTypeApplications, GHC makes promises about the ordering
of implicit variable quantification. Specifically, we offer that implicitly
quantified variables (such as those in const :: a -&gt; b -&gt; a, without a `forall`)
will occur in left-to-right order of first occurrence. Here are a few examples:

  const :: a -&gt; b -&gt; a       -- forall a b. ...
  f :: Eq a =&gt; b -&gt; a -&gt; a   -- forall a b. ...  contexts are included

  type a &lt;-&lt; b = b -&gt; a
  g :: a &lt;-&lt; b               -- forall a b. ...  type synonyms matter

  class Functor f where
    fmap :: (a -&gt; b) -&gt; f a -&gt; f b   -- forall f a b. ...
    -- The f is quantified by the class, so only a and b are considered in fmap

This simple story is complicated by the possibility of dependency: all variables
must come after any variables mentioned in their kinds.

  typeRep :: Typeable a =&gt; TypeRep (a :: k)   -- forall k a. ...

The k comes first because a depends on k, even though the k appears later than
the a in the code. Thus, GHC does ScopedSort on the variables.
See Note [ScopedSort] in GHC.Core.Type.

Implicitly bound variables are collected by any function which returns a
FreeKiTyVars, which notably includes the `extract-` family of functions
(extractHsTysRdrTyVars, extractHsTyVarBndrsKVs, etc.).
These functions thus promise to keep left-to-right ordering.

Note [Implicit quantification in type synonyms]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We typically bind type/kind variables implicitly when they are in a kind
annotation on the LHS, for example:

  data Proxy (a :: k) = Proxy
  type KindOf (a :: k) = k

Here 'k' is in the kind annotation of a type variable binding, KindedTyVar, and
we want to implicitly quantify over it.  This is easy: just extract all free
variables from the kind signature. That's what we do in extract_hs_tv_bndrs_kvs

By contrast, on the RHS we can't simply collect *all* free variables. Which of
the following are allowed?

  type TySyn1 = a :: Type
  type TySyn2 = 'Nothing :: Maybe a
  type TySyn3 = 'Just ('Nothing :: Maybe a)
  type TySyn4 = 'Left a :: Either Type a

After some design deliberations (see non-taken alternatives below), the answer
is to reject TySyn1 and TySyn3, but allow TySyn2 and TySyn4, at least for now.
We implicitly quantify over free variables of the outermost kind signature, if
one exists:

  * In TySyn1, the outermost kind signature is (:: Type), and it does not have
    any free variables.
  * In TySyn2, the outermost kind signature is (:: Maybe a), it contains a
    free variable 'a', which we implicitly quantify over.
  * In TySyn3, there is no outermost kind signature. The (:: Maybe a) signature
    is hidden inside 'Just.
  * In TySyn4, the outermost kind signature is (:: Either Type a), it contains
    a free variable 'a', which we implicitly quantify over. That is why we can
    also use it to the left of the double colon: 'Left a

The logic resides in extractHsTyRdrTyVarsKindVars. We use it both for type
synonyms and type family instances.

This is something of a stopgap solution until we can explicitly bind invisible
type/kind variables:

  type TySyn3 :: forall a. Maybe a
  type TySyn3 @a = 'Just ('Nothing :: Maybe a)

Note [Implicit quantification in type synonyms: non-taken alternatives]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Alternative I: No quantification
--------------------------------
We could offer no implicit quantification on the RHS, accepting none of the
TySyn&lt;N&gt; examples. The user would have to bind the variables explicitly:

  type TySyn1 a = a :: Type
  type TySyn2 a = 'Nothing :: Maybe a
  type TySyn3 a = 'Just ('Nothing :: Maybe a)
  type TySyn4 a = 'Left a :: Either Type a

However, this would mean that one would have to specify 'a' at call sites every
time, which could be undesired.

Alternative II: Indiscriminate quantification
---------------------------------------------
We could implicitly quantify over all free variables on the RHS just like we do
on the LHS. Then we would infer the following kinds:

  TySyn1 :: forall {a}. Type
  TySyn2 :: forall {a}. Maybe a
  TySyn3 :: forall {a}. Maybe (Maybe a)
  TySyn4 :: forall {a}. Either Type a

This would work fine for TySyn&lt;2,3,4&gt;, but TySyn1 is clearly bogus: the variable
is free-floating, not fixed by anything.

Alternative III: reportFloatingKvs
----------------------------------
We could augment Alternative II by hunting down free-floating variables during
type checking. While viable, this would mean we'd end up accepting this:

  data Prox k (a :: k)
  type T = Prox k

-}</span><span>
</span><span id="line-1701"></span><span>
</span><span id="line-1702"></span><span class="hs-comment">-- A list of free type/kind variables, which can contain duplicates.</span><span>
</span><span id="line-1703"></span><span class="hs-comment">-- See Note [Kind and type-variable binders]</span><span>
</span><span id="line-1704"></span><span class="hs-comment">-- These lists are guaranteed to preserve left-to-right ordering of</span><span>
</span><span id="line-1705"></span><span class="hs-comment">-- the types the variables were extracted from. See also</span><span>
</span><span id="line-1706"></span><span class="hs-comment">-- Note [Ordering of implicit variables].</span><span>
</span><span id="line-1707"></span><span class="hs-keyword">type</span><span> </span><span id="FreeKiTyVars"><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-var">FreeKiTyVars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1708"></span><span>
</span><span id="line-1709"></span><span class="hs-comment">-- | Filter out any type and kind variables that are already in scope in the</span><span>
</span><span id="line-1710"></span><span class="hs-comment">-- the supplied LocalRdrEnv. Note that this includes named wildcards, which</span><span>
</span><span id="line-1711"></span><span class="hs-comment">-- look like perfectly ordinary type variables at this point.</span><span>
</span><span id="line-1712"></span><span class="annot"><a href="GHC.Rename.HsType.html#filterInScope"><span class="hs-identifier hs-type">filterInScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#LocalRdrEnv"><span class="hs-identifier hs-type">LocalRdrEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1713"></span><span id="filterInScope"><span class="annot"><span class="annottext">filterInScope :: LocalRdrEnv -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScope"><span class="hs-identifier hs-var hs-var">filterInScope</span></a></span></span><span> </span><span id="local-6989586621681129039"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129039"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; Bool)
-&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.Utils.Misc.html#filterOut"><span class="hs-identifier hs-var">filterOut</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalRdrEnv -&gt; RdrName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#inScope"><span class="hs-identifier hs-var">inScope</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129039"><span class="hs-identifier hs-var">rdr_env</span></a></span><span> </span><span class="annot"><span class="annottext">(RdrName -&gt; Bool)
-&gt; (GenLocated SrcSpan RdrName -&gt; RdrName)
-&gt; GenLocated SrcSpan RdrName
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1714"></span><span>
</span><span id="line-1715"></span><span class="hs-comment">-- | Filter out any type and kind variables that are already in scope in the</span><span>
</span><span id="line-1716"></span><span class="hs-comment">-- the environment's LocalRdrEnv. Note that this includes named wildcards,</span><span>
</span><span id="line-1717"></span><span class="hs-comment">-- which look like perfectly ordinary type variables at this point.</span><span>
</span><span id="line-1718"></span><span class="annot"><a href="GHC.Rename.HsType.html#filterInScopeM"><span class="hs-identifier hs-type">filterInScopeM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#RnM"><span class="hs-identifier hs-type">RnM</span></a></span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1719"></span><span id="filterInScopeM"><span class="annot"><span class="annottext">filterInScopeM :: FreeKiTyVars -&gt; RnM FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScopeM"><span class="hs-identifier hs-var hs-var">filterInScopeM</span></a></span></span><span> </span><span id="local-6989586621681129036"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129036"><span class="hs-identifier hs-var">vars</span></a></span></span><span>
</span><span id="line-1720"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681129035"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129035"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RnM LocalRdrEnv
</span><a href="GHC.Tc.Utils.Monad.html#getLocalRdrEnv"><span class="hs-identifier hs-var">getLocalRdrEnv</span></a></span><span>
</span><span id="line-1721"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; RnM FreeKiTyVars
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalRdrEnv -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterInScope"><span class="hs-identifier hs-var">filterInScope</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129035"><span class="hs-identifier hs-var">rdr_env</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129036"><span class="hs-identifier hs-var">vars</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1722"></span><span>
</span><span id="line-1723"></span><span class="annot"><a href="GHC.Rename.HsType.html#inScope"><span class="hs-identifier hs-type">inScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#LocalRdrEnv"><span class="hs-identifier hs-type">LocalRdrEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1724"></span><span id="inScope"><span class="annot"><span class="annottext">inScope :: LocalRdrEnv -&gt; RdrName -&gt; Bool
</span><a href="GHC.Rename.HsType.html#inScope"><span class="hs-identifier hs-var hs-var">inScope</span></a></span></span><span> </span><span id="local-6989586621681129034"><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129034"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span id="local-6989586621681129033"><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129033"><span class="hs-identifier hs-var">rdr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RdrName
</span><a href="#local-6989586621681129033"><span class="hs-identifier hs-var">rdr</span></a></span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; LocalRdrEnv -&gt; Bool
</span><a href="GHC.Types.Name.Reader.html#elemLocalRdrEnv"><span class="hs-operator hs-var">`elemLocalRdrEnv`</span></a></span><span> </span><span class="annot"><span class="annottext">LocalRdrEnv
</span><a href="#local-6989586621681129034"><span class="hs-identifier hs-var">rdr_env</span></a></span><span>
</span><span id="line-1725"></span><span>
</span><span id="line-1726"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_tyarg"><span class="hs-identifier hs-type">extract_tyarg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1727"></span><span id="extract_tyarg"><span class="annot"><span class="annottext">extract_tyarg :: LHsTypeArg GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tyarg"><span class="hs-identifier hs-var hs-var">extract_tyarg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsValArg"><span class="hs-identifier hs-type">HsValArg</span></a></span><span> </span><span id="local-6989586621681129030"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129030"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129029"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129029"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129030"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129029"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1728"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_tyarg"><span class="hs-identifier hs-var">extract_tyarg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsTypeArg"><span class="hs-identifier hs-type">HsTypeArg</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129027"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129027"><span class="hs-identifier hs-var">ki</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129026"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129026"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129027"><span class="hs-identifier hs-var">ki</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129026"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1729"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_tyarg"><span class="hs-identifier hs-var">extract_tyarg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsArgPar"><span class="hs-identifier hs-type">HsArgPar</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681129025"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129025"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129025"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1730"></span><span>
</span><span id="line-1731"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_tyargs"><span class="hs-identifier hs-type">extract_tyargs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1732"></span><span id="extract_tyargs"><span class="annot"><span class="annottext">extract_tyargs :: [LHsTypeArg GhcPs] -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tyargs"><span class="hs-identifier hs-var hs-var">extract_tyargs</span></a></span></span><span> </span><span id="local-6989586621681129023"><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129023"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681129022"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129022"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTypeArg GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; [LHsTypeArg GhcPs] -&gt; FreeKiTyVars
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTypeArg GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tyarg"><span class="hs-identifier hs-var">extract_tyarg</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129022"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129023"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-1733"></span><span>
</span><span id="line-1734"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyArgRdrKiTyVars"><span class="hs-identifier hs-type">extractHsTyArgRdrKiTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTypeArg"><span class="hs-identifier hs-type">LHsTypeArg</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1735"></span><span id="extractHsTyArgRdrKiTyVars"><span class="annot"><span class="annottext">extractHsTyArgRdrKiTyVars :: [LHsTypeArg GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyArgRdrKiTyVars"><span class="hs-identifier hs-var hs-var">extractHsTyArgRdrKiTyVars</span></a></span></span><span> </span><span id="local-6989586621681129020"><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129020"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-1736"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTypeArg GhcPs] -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tyargs"><span class="hs-identifier hs-var">extract_tyargs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTypeArg GhcPs]
</span><a href="#local-6989586621681129020"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1737"></span><span>
</span><span id="line-1738"></span><span class="hs-comment">-- | 'extractHsTyRdrTyVars' finds the type/kind variables</span><span>
</span><span id="line-1739"></span><span class="hs-comment">--                          of a HsType/HsKind.</span><span>
</span><span id="line-1740"></span><span class="hs-comment">-- It's used when making the @forall@s explicit.</span><span>
</span><span id="line-1741"></span><span class="hs-comment">-- See Note [Kind and type-variable binders]</span><span>
</span><span id="line-1742"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-type">extractHsTyRdrTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1743"></span><span id="extractHsTyRdrTyVars"><span class="annot"><span class="annottext">extractHsTyRdrTyVars :: LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var hs-var">extractHsTyRdrTyVars</span></a></span></span><span> </span><span id="local-6989586621681129019"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129019"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129019"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1744"></span><span>
</span><span id="line-1745"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsScaledTysRdrTyVars"><span class="hs-identifier hs-type">extractHsScaledTysRdrTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-type">HsScaled</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1746"></span><span id="extractHsScaledTysRdrTyVars"><span class="annot"><span class="annottext">extractHsScaledTysRdrTyVars :: [HsScaled GhcPs (LHsType GhcPs)] -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsScaledTysRdrTyVars"><span class="hs-identifier hs-var hs-var">extractHsScaledTysRdrTyVars</span></a></span></span><span> </span><span id="local-6989586621681129018"><span class="annot"><span class="annottext">[HsScaled GhcPs (LHsType GhcPs)]
</span><a href="#local-6989586621681129018"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681129017"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129017"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsScaled GhcPs (LHsType GhcPs) -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; [HsScaled GhcPs (LHsType GhcPs)] -&gt; FreeKiTyVars
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsScaled"><span class="hs-identifier hs-type">HsScaled</span></a></span><span> </span><span id="local-6989586621681129016"><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129016"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621681129015"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129015"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129015"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; (FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_arrow"><span class="hs-identifier hs-var">extract_hs_arrow</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681129016"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681129017"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">[HsScaled GhcPs (LHsType GhcPs)]
</span><a href="#local-6989586621681129018"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-1747"></span><span>
</span><span id="line-1748"></span><span class="hs-comment">-- | Extracts the free type/kind variables from the kind signature of a HsType.</span><span>
</span><span id="line-1749"></span><span class="hs-comment">--   This is used to implicitly quantify over @k@ in @type T = Nothing :: Maybe k@.</span><span>
</span><span id="line-1750"></span><span class="hs-comment">-- The left-to-right order of variables is preserved.</span><span>
</span><span id="line-1751"></span><span class="hs-comment">-- See Note [Kind and type-variable binders] and</span><span>
</span><span id="line-1752"></span><span class="hs-comment">--     Note [Ordering of implicit variables] and</span><span>
</span><span id="line-1753"></span><span class="hs-comment">--     Note [Implicit quantification in type synonyms].</span><span>
</span><span id="line-1754"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVarsKindVars"><span class="hs-identifier hs-type">extractHsTyRdrTyVarsKindVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1755"></span><span id="extractHsTyRdrTyVarsKindVars"><span class="annot"><span class="annottext">extractHsTyRdrTyVarsKindVars :: LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVarsKindVars"><span class="hs-identifier hs-var hs-var">extractHsTyRdrTyVarsKindVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129013"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129013"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1756"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681129013"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1757"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsParTy"><span class="hs-identifier hs-type">HsParTy</span></a></span><span> </span><span class="annot"><span class="annottext">XParTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129012"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129012"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVarsKindVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVarsKindVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129012"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1758"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsKindSig"><span class="hs-identifier hs-type">HsKindSig</span></a></span><span> </span><span class="annot"><span class="annottext">XKindSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129011"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129011"><span class="hs-identifier hs-var">ki</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129011"><span class="hs-identifier hs-var">ki</span></a></span><span>
</span><span id="line-1759"></span><span>    </span><span class="annot"><span class="annottext">HsType GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1760"></span><span>
</span><span id="line-1761"></span><span class="hs-comment">-- | Extracts free type and kind variables from types in a list.</span><span>
</span><span id="line-1762"></span><span class="hs-comment">-- When the same name occurs multiple times in the types, all occurrences</span><span>
</span><span id="line-1763"></span><span class="hs-comment">-- are returned.</span><span>
</span><span id="line-1764"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTysRdrTyVars"><span class="hs-identifier hs-type">extractHsTysRdrTyVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1765"></span><span id="extractHsTysRdrTyVars"><span class="annot"><span class="annottext">extractHsTysRdrTyVars :: HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTysRdrTyVars"><span class="hs-identifier hs-var hs-var">extractHsTysRdrTyVars</span></a></span></span><span> </span><span id="local-6989586621681129010"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129010"><span class="hs-identifier hs-var">tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681129010"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-1766"></span><span>
</span><span id="line-1767"></span><span class="hs-comment">-- Returns the free kind variables of any explicitly-kinded binders, returning</span><span>
</span><span id="line-1768"></span><span class="hs-comment">-- variable occurrences in left-to-right order.</span><span>
</span><span id="line-1769"></span><span class="hs-comment">-- See Note [Ordering of implicit variables].</span><span>
</span><span id="line-1770"></span><span class="hs-comment">-- NB: Does /not/ delete the binders themselves.</span><span>
</span><span id="line-1771"></span><span class="hs-comment">--     E.g. given  [k1, a:k1, b:k2]</span><span>
</span><span id="line-1772"></span><span class="hs-comment">--          the function returns [k1,k2], even though k1 is bound here</span><span>
</span><span id="line-1773"></span><span id="local-6989586621681130534"><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTyVarBndrsKVs"><span class="hs-identifier hs-type">extractHsTyVarBndrsKVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130534"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span></span><span>
</span><span id="line-1774"></span><span id="extractHsTyVarBndrsKVs"><span class="annot"><span class="annottext">extractHsTyVarBndrsKVs :: forall flag. [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyVarBndrsKVs"><span class="hs-identifier hs-var hs-var">extractHsTyVarBndrsKVs</span></a></span></span><span> </span><span id="local-6989586621681129008"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129008"><span class="hs-identifier hs-var">tv_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
forall flag. [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs_kvs"><span class="hs-identifier hs-var">extract_hs_tv_bndrs_kvs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681129008"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span>
</span><span id="line-1775"></span><span>
</span><span id="line-1776"></span><span class="hs-comment">-- Returns the free kind variables in a type family result signature, returning</span><span>
</span><span id="line-1777"></span><span class="hs-comment">-- variable occurrences in left-to-right order.</span><span>
</span><span id="line-1778"></span><span class="hs-comment">-- See Note [Ordering of implicit variables].</span><span>
</span><span id="line-1779"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractRdrKindSigVars"><span class="hs-identifier hs-type">extractRdrKindSigVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#LFamilyResultSig"><span class="hs-identifier hs-type">LFamilyResultSig</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1780"></span><span id="extractRdrKindSigVars"><span class="annot"><span class="annottext">extractRdrKindSigVars :: LFamilyResultSig GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractRdrKindSigVars"><span class="hs-identifier hs-var hs-var">extractRdrKindSigVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129006"><span class="annot"><span class="annottext">FamilyResultSig GhcPs
</span><a href="#local-6989586621681129006"><span class="hs-identifier hs-var">resultSig</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FamilyResultSig GhcPs
</span><a href="#local-6989586621681129006"><span class="hs-identifier hs-var">resultSig</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1781"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#KindSig"><span class="hs-identifier hs-type">KindSig</span></a></span><span> </span><span class="annot"><span class="annottext">XCKindSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129004"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129004"><span class="hs-identifier hs-var">k</span></a></span></span><span>                            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129004"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-1782"></span><span>  </span><span class="annot"><a href="GHC.Hs.Decls.html#TyVarSig"><span class="hs-identifier hs-type">TyVarSig</span></a></span><span> </span><span class="annot"><span class="annottext">XTyVarSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#KindedTyVar"><span class="hs-identifier hs-type">KindedTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XKindedTyVar GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681129002"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129002"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681129002"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-1783"></span><span>  </span><span class="annot"><span class="annottext">FamilyResultSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1784"></span><span>
</span><span id="line-1785"></span><span class="hs-comment">-- | Get type/kind variables mentioned in the kind signature, preserving</span><span>
</span><span id="line-1786"></span><span class="hs-comment">-- left-to-right order:</span><span>
</span><span id="line-1787"></span><span class="hs-comment">--</span><span>
</span><span id="line-1788"></span><span class="hs-comment">--  * data T a (b :: k1) :: k2 -&gt; k1 -&gt; k2 -&gt; Type   -- result: [k2,k1]</span><span>
</span><span id="line-1789"></span><span class="hs-comment">--  * data T a (b :: k1)                             -- result: []</span><span>
</span><span id="line-1790"></span><span class="hs-comment">--</span><span>
</span><span id="line-1791"></span><span class="hs-comment">-- See Note [Ordering of implicit variables].</span><span>
</span><span id="line-1792"></span><span class="annot"><a href="GHC.Rename.HsType.html#extractDataDefnKindVars"><span class="hs-identifier hs-type">extractDataDefnKindVars</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Decls.html#HsDataDefn"><span class="hs-identifier hs-type">HsDataDefn</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1793"></span><span id="extractDataDefnKindVars"><span class="annot"><span class="annottext">extractDataDefnKindVars :: HsDataDefn GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractDataDefnKindVars"><span class="hs-identifier hs-var hs-var">extractDataDefnKindVars</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Decls.html#HsDataDefn"><span class="hs-identifier hs-type">HsDataDefn</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dd_kindSig :: forall pass. HsDataDefn pass -&gt; Maybe (LHsKind pass)
</span><a href="GHC.Hs.Decls.html#dd_kindSig"><span class="hs-identifier hs-var">dd_kindSig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128999"><span class="annot"><span class="annottext">Maybe (LHsType GhcPs)
</span><a href="#local-6989586621681128999"><span class="hs-identifier hs-var">ksig</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-1794"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
-&gt; (LHsType GhcPs -&gt; FreeKiTyVars)
-&gt; Maybe (LHsType GhcPs)
-&gt; FreeKiTyVars
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTyRdrTyVars"><span class="hs-identifier hs-var">extractHsTyRdrTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (LHsType GhcPs)
</span><a href="#local-6989586621681128999"><span class="hs-identifier hs-var">ksig</span></a></span><span>
</span><span id="line-1795"></span><span>
</span><span id="line-1796"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_lctxt"><span class="hs-identifier hs-type">extract_lctxt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsContext"><span class="hs-identifier hs-type">LHsContext</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1797"></span><span id="extract_lctxt"><span class="annot"><span class="annottext">extract_lctxt :: GenLocated SrcSpan (HsContext GhcPs)
-&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lctxt"><span class="hs-identifier hs-var hs-var">extract_lctxt</span></a></span></span><span> </span><span id="local-6989586621681128996"><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681128996"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs) -&gt; HsContext GhcPs
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681128996"><span class="hs-identifier hs-var">ctxt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1798"></span><span>
</span><span id="line-1799"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-type">extract_ltys</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1800"></span><span id="extract_ltys"><span class="annot"><span class="annottext">extract_ltys :: HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var hs-var">extract_ltys</span></a></span></span><span> </span><span id="local-6989586621681128995"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128995"><span class="hs-identifier hs-var">tys</span></a></span></span><span> </span><span id="local-6989586621681128994"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128994"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; HsContext GhcPs -&gt; FreeKiTyVars
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128994"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128995"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-1801"></span><span>
</span><span id="line-1802"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-type">extract_lty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#LHsType"><span class="hs-identifier hs-type">LHsType</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1803"></span><span id="extract_lty"><span class="annot"><span class="annottext">extract_lty :: LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var hs-var">extract_lty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128993"><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681128993"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128992"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span></span><span>
</span><span id="line-1804"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsType GhcPs
</span><a href="#local-6989586621681128993"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1805"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsTyVar"><span class="hs-identifier hs-type">HsTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XTyVar GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PromotionFlag
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621681128991"><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128991"><span class="hs-identifier hs-var">ltv</span></a></span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tv"><span class="hs-identifier hs-var">extract_tv</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128991"><span class="hs-identifier hs-var">ltv</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1806"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsBangTy"><span class="hs-identifier hs-type">HsBangTy</span></a></span><span> </span><span class="annot"><span class="annottext">XBangTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsSrcBang
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128989"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128989"><span class="hs-identifier hs-var">ty</span></a></span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128989"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1807"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsRecTy"><span class="hs-identifier hs-type">HsRecTy</span></a></span><span> </span><span class="annot"><span class="annottext">XRecTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128988"><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681128988"><span class="hs-identifier hs-var">flds</span></a></span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(LConDeclField GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; [LConDeclField GhcPs] -&gt; FreeKiTyVars
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span>
</span><span id="line-1808"></span><span>                                            </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; (LConDeclField GhcPs -&gt; LHsType GhcPs)
-&gt; LConDeclField GhcPs
-&gt; FreeKiTyVars
-&gt; FreeKiTyVars
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ConDeclField GhcPs -&gt; LHsType GhcPs
forall pass. ConDeclField pass -&gt; LBangType pass
</span><a href="GHC.Hs.Type.html#cd_fld_type"><span class="hs-identifier hs-var hs-var">cd_fld_type</span></a></span><span> </span><span class="annot"><span class="annottext">(ConDeclField GhcPs -&gt; LHsType GhcPs)
-&gt; (LConDeclField GhcPs -&gt; ConDeclField GhcPs)
-&gt; LConDeclField GhcPs
-&gt; LHsType GhcPs
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LConDeclField GhcPs -&gt; ConDeclField GhcPs
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1809"></span><span>                                           </span><span class="annot"><span class="annottext">[LConDeclField GhcPs]
</span><a href="#local-6989586621681128988"><span class="hs-identifier hs-var">flds</span></a></span><span>
</span><span id="line-1810"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsAppTy"><span class="hs-identifier hs-type">HsAppTy</span></a></span><span> </span><span class="annot"><span class="annottext">XAppTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128986"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128986"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681128985"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128985"><span class="hs-identifier hs-var">ty2</span></a></span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128986"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1811"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128985"><span class="hs-identifier hs-var">ty2</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1812"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsAppKindTy"><span class="hs-identifier hs-type">HsAppKindTy</span></a></span><span> </span><span class="annot"><span class="annottext">XAppKindTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128984"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128984"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681128983"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128983"><span class="hs-identifier hs-var">k</span></a></span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128984"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1813"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128983"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1814"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsListTy"><span class="hs-identifier hs-type">HsListTy</span></a></span><span> </span><span class="annot"><span class="annottext">XListTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128982"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128982"><span class="hs-identifier hs-var">ty</span></a></span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128982"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1815"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsTupleTy"><span class="hs-identifier hs-type">HsTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">XTupleTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsTupleSort
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128981"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128981"><span class="hs-identifier hs-var">tys</span></a></span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128981"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1816"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsSumTy"><span class="hs-identifier hs-type">HsSumTy</span></a></span><span> </span><span class="annot"><span class="annottext">XSumTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128980"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128980"><span class="hs-identifier hs-var">tys</span></a></span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128980"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1817"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsFunTy"><span class="hs-identifier hs-type">HsFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">XFunTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128979"><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681128979"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621681128978"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128978"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681128977"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128977"><span class="hs-identifier hs-var">ty2</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128978"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1818"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128977"><span class="hs-identifier hs-var">ty2</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1819"></span><span>                                     </span><span class="annot"><span class="annottext">HsArrow GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_arrow"><span class="hs-identifier hs-var">extract_hs_arrow</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs
</span><a href="#local-6989586621681128979"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1820"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsIParamTy"><span class="hs-identifier hs-type">HsIParamTy</span></a></span><span> </span><span class="annot"><span class="annottext">XIParamTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Located HsIPName
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128976"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128976"><span class="hs-identifier hs-var">ty</span></a></span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128976"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1821"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsOpTy"><span class="hs-identifier hs-type">HsOpTy</span></a></span><span> </span><span class="annot"><span class="annottext">XOpTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128975"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128975"><span class="hs-identifier hs-var">ty1</span></a></span></span><span> </span><span id="local-6989586621681128974"><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128974"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621681128973"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128973"><span class="hs-identifier hs-var">ty2</span></a></span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tv"><span class="hs-identifier hs-var">extract_tv</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
GenLocated SrcSpan (IdP GhcPs)
</span><a href="#local-6989586621681128974"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1822"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128975"><span class="hs-identifier hs-var">ty1</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1823"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128973"><span class="hs-identifier hs-var">ty2</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1824"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsParTy"><span class="hs-identifier hs-type">HsParTy</span></a></span><span> </span><span class="annot"><span class="annottext">XParTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128972"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128972"><span class="hs-identifier hs-var">ty</span></a></span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128972"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1825"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsSpliceTy"><span class="hs-identifier hs-type">HsSpliceTy</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>  </span><span class="hs-comment">-- Type splices mention no tvs</span><span>
</span><span id="line-1826"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsDocTy"><span class="hs-identifier hs-type">HsDocTy</span></a></span><span> </span><span class="annot"><span class="annottext">XDocTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128971"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128971"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">LHsDocString
</span><span class="hs-identifier">_</span></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128971"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1827"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitListTy"><span class="hs-identifier hs-type">HsExplicitListTy</span></a></span><span> </span><span class="annot"><span class="annottext">XExplicitListTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">PromotionFlag
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128970"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128970"><span class="hs-identifier hs-var">tys</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128970"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1828"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitTupleTy"><span class="hs-identifier hs-type">HsExplicitTupleTy</span></a></span><span> </span><span class="annot"><span class="annottext">XExplicitTupleTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128969"><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128969"><span class="hs-identifier hs-var">tys</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_ltys"><span class="hs-identifier hs-var">extract_ltys</span></a></span><span> </span><span class="annot"><span class="annottext">HsContext GhcPs
</span><a href="#local-6989586621681128969"><span class="hs-identifier hs-var">tys</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1829"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsTyLit"><span class="hs-identifier hs-type">HsTyLit</span></a></span><span> </span><span class="annot"><span class="annottext">XTyLit GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">HsTyLit
</span><span class="hs-identifier">_</span></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1830"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsStarTy"><span class="hs-identifier hs-type">HsStarTy</span></a></span><span> </span><span class="annot"><span class="annottext">XStarTy GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1831"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsKindSig"><span class="hs-identifier hs-type">HsKindSig</span></a></span><span> </span><span class="annot"><span class="annottext">XKindSig GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128968"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128968"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681128967"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128967"><span class="hs-identifier hs-var">ki</span></a></span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128968"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1832"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128967"><span class="hs-identifier hs-var">ki</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1833"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTy"><span class="hs-identifier hs-type">HsForAllTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_tele :: forall pass. HsType pass -&gt; HsForAllTelescope pass
</span><a href="GHC.Hs.Type.html#hst_tele"><span class="hs-identifier hs-var">hst_tele</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128966"><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681128966"><span class="hs-identifier hs-var">tele</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128965"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128965"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1834"></span><span>                                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_for_all_telescope"><span class="hs-identifier hs-var">extract_hs_for_all_telescope</span></a></span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681128966"><span class="hs-identifier hs-var">tele</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1835"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128965"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1836"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsQualTy"><span class="hs-identifier hs-type">HsQualTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hst_ctxt :: forall pass. HsType pass -&gt; LHsContext pass
</span><a href="GHC.Hs.Type.html#hst_ctxt"><span class="hs-identifier hs-var">hst_ctxt</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128963"><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681128963"><span class="hs-identifier hs-var">ctxt</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">hst_body :: forall pass. HsType pass -&gt; LHsType pass
</span><a href="GHC.Hs.Type.html#hst_body"><span class="hs-identifier hs-var">hst_body</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128962"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128962"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1837"></span><span>                                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
-&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lctxt"><span class="hs-identifier hs-var">extract_lctxt</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (HsContext GhcPs)
</span><a href="#local-6989586621681128963"><span class="hs-identifier hs-var">ctxt</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1838"></span><span>                                     </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128962"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1839"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#XHsType"><span class="hs-identifier hs-type">XHsType</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1840"></span><span>      </span><span class="hs-comment">-- We deal with these separately in rnLHsTypeWithWildCards</span><span>
</span><span id="line-1841"></span><span>      </span><span class="annot"><a href="GHC.Hs.Type.html#HsWildCardTy"><span class="hs-identifier hs-type">HsWildCardTy</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128992"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1842"></span><span>
</span><span id="line-1843"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_hs_arrow"><span class="hs-identifier hs-type">extract_hs_arrow</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsArrow"><span class="hs-identifier hs-type">HsArrow</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1844"></span><span>                   </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1845"></span><span id="extract_hs_arrow"><span class="annot"><span class="annottext">extract_hs_arrow :: HsArrow GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_arrow"><span class="hs-identifier hs-var hs-var">extract_hs_arrow</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#HsExplicitMult"><span class="hs-identifier hs-type">HsExplicitMult</span></a></span><span> </span><span class="annot"><span class="annottext">IsUnicodeSyntax
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128961"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128961"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681128960"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128960"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128961"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128960"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1846"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_hs_arrow"><span class="hs-identifier hs-var">extract_hs_arrow</span></a></span><span> </span><span class="annot"><span class="annottext">HsArrow GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128959"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128959"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128959"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1847"></span><span>
</span><span id="line-1848"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_hs_for_all_telescope"><span class="hs-identifier hs-type">extract_hs_for_all_telescope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllTelescope"><span class="hs-identifier hs-type">HsForAllTelescope</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span>
</span><span id="line-1849"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-comment">-- Accumulator</span><span>
</span><span id="line-1850"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-comment">-- Free in body</span><span>
</span><span id="line-1851"></span><span>                             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1852"></span><span id="extract_hs_for_all_telescope"><span class="annot"><span class="annottext">extract_hs_for_all_telescope :: HsForAllTelescope GhcPs
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_for_all_telescope"><span class="hs-identifier hs-var hs-var">extract_hs_for_all_telescope</span></a></span></span><span> </span><span id="local-6989586621681128958"><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681128958"><span class="hs-identifier hs-var">tele</span></a></span></span><span> </span><span id="local-6989586621681128957"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128957"><span class="hs-identifier hs-var">acc_vars</span></a></span></span><span> </span><span id="local-6989586621681128956"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128956"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1853"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HsForAllTelescope GhcPs
</span><a href="#local-6989586621681128958"><span class="hs-identifier hs-var">tele</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1854"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllVis"><span class="hs-identifier hs-type">HsForAllVis</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsf_vis_bndrs :: forall pass. HsForAllTelescope pass -&gt; [LHsTyVarBndr () pass]
</span><a href="GHC.Hs.Type.html#hsf_vis_bndrs"><span class="hs-identifier hs-var">hsf_vis_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128955"><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681128955"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1855"></span><span>      </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall flag.
[LHsTyVarBndr flag GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs"><span class="hs-identifier hs-var">extract_hs_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr () GhcPs]
</span><a href="#local-6989586621681128955"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128957"><span class="hs-identifier hs-var">acc_vars</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128956"><span class="hs-identifier hs-var">body_fvs</span></a></span><span>
</span><span id="line-1856"></span><span>    </span><span class="annot"><a href="GHC.Hs.Type.html#HsForAllInvis"><span class="hs-identifier hs-type">HsForAllInvis</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">hsf_invis_bndrs :: forall pass.
HsForAllTelescope pass -&gt; [LHsTyVarBndr Specificity pass]
</span><a href="GHC.Hs.Type.html#hsf_invis_bndrs"><span class="hs-identifier hs-var">hsf_invis_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681128953"><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcPs]
</span><a href="#local-6989586621681128953"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1857"></span><span>      </span><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall flag.
[LHsTyVarBndr flag GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs"><span class="hs-identifier hs-var">extract_hs_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr Specificity GhcPs]
</span><a href="#local-6989586621681128953"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128957"><span class="hs-identifier hs-var">acc_vars</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128956"><span class="hs-identifier hs-var">body_fvs</span></a></span><span>
</span><span id="line-1858"></span><span>
</span><span id="line-1859"></span><span id="local-6989586621681130405"><span class="annot"><a href="GHC.Rename.HsType.html#extractHsTvBndrs"><span class="hs-identifier hs-type">extractHsTvBndrs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130405"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1860"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>       </span><span class="hs-comment">-- Free in body</span><span>
</span><span id="line-1861"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span></span><span>       </span><span class="hs-comment">-- Free in result</span><span>
</span><span id="line-1862"></span><span id="extractHsTvBndrs"><span class="annot"><span class="annottext">extractHsTvBndrs :: forall flag.
[LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extractHsTvBndrs"><span class="hs-identifier hs-var hs-var">extractHsTvBndrs</span></a></span></span><span> </span><span id="local-6989586621681128952"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128952"><span class="hs-identifier hs-var">tv_bndrs</span></a></span></span><span> </span><span id="local-6989586621681128951"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128951"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span>
</span><span id="line-1863"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall flag.
[LHsTyVarBndr flag GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs"><span class="hs-identifier hs-var">extract_hs_tv_bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128952"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128951"><span class="hs-identifier hs-var">body_fvs</span></a></span><span>
</span><span id="line-1864"></span><span>
</span><span id="line-1865"></span><span id="local-6989586621681130406"><span class="annot"><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs"><span class="hs-identifier hs-type">extract_hs_tv_bndrs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130406"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1866"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>  </span><span class="hs-comment">-- Accumulator</span><span>
</span><span id="line-1867"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>  </span><span class="hs-comment">-- Free in body</span><span>
</span><span id="line-1868"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span></span><span>
</span><span id="line-1869"></span><span class="hs-comment">-- In (forall (a :: Maybe e). a -&gt; b) we have</span><span>
</span><span id="line-1870"></span><span class="hs-comment">--     'a' is bound by the forall</span><span>
</span><span id="line-1871"></span><span class="hs-comment">--     'b' is a free type variable</span><span>
</span><span id="line-1872"></span><span class="hs-comment">--     'e' is a free kind variable</span><span>
</span><span id="line-1873"></span><span id="extract_hs_tv_bndrs"><span class="annot"><span class="annottext">extract_hs_tv_bndrs :: forall flag.
[LHsTyVarBndr flag GhcPs]
-&gt; FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs"><span class="hs-identifier hs-var hs-var">extract_hs_tv_bndrs</span></a></span></span><span> </span><span id="local-6989586621681128949"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128949"><span class="hs-identifier hs-var">tv_bndrs</span></a></span></span><span> </span><span id="local-6989586621681128948"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128948"><span class="hs-identifier hs-var">acc_vars</span></a></span></span><span> </span><span id="local-6989586621681128947"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128947"><span class="hs-identifier hs-var">body_vars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128946"><span class="hs-identifier hs-var">new_vars</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128948"><span class="hs-identifier hs-var">acc_vars</span></a></span><span>
</span><span id="line-1874"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1875"></span><span>    </span><span id="local-6989586621681128946"><span class="annot"><span class="annottext">new_vars :: FreeKiTyVars
</span><a href="#local-6989586621681128946"><span class="hs-identifier hs-var hs-var">new_vars</span></a></span></span><span>
</span><span id="line-1876"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128949"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128947"><span class="hs-identifier hs-var">body_vars</span></a></span><span>
</span><span id="line-1877"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-var">filterFreeVarsToBind</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128945"><span class="hs-identifier hs-var">tv_bndr_rdrs</span></a></span><span> </span><span class="annot"><span class="annottext">(FreeKiTyVars -&gt; FreeKiTyVars) -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128944"><span class="hs-identifier hs-var">bndr_vars</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128947"><span class="hs-identifier hs-var">body_vars</span></a></span><span>
</span><span id="line-1878"></span><span>    </span><span class="hs-comment">-- NB: delete all tv_bndr_rdrs from bndr_vars as well as body_vars.</span><span>
</span><span id="line-1879"></span><span>    </span><span class="hs-comment">-- See Note [Kind variable scoping]</span><span>
</span><span id="line-1880"></span><span>    </span><span id="local-6989586621681128944"><span class="annot"><span class="annottext">bndr_vars :: FreeKiTyVars
</span><a href="#local-6989586621681128944"><span class="hs-identifier hs-var hs-var">bndr_vars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
forall flag. [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs_kvs"><span class="hs-identifier hs-var">extract_hs_tv_bndrs_kvs</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128949"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span>
</span><span id="line-1881"></span><span>    </span><span id="local-6989586621681128945"><span class="annot"><span class="annottext">tv_bndr_rdrs :: FreeKiTyVars
</span><a href="#local-6989586621681128945"><span class="hs-identifier hs-var hs-var">tv_bndr_rdrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LHsTyVarBndr flag GhcPs -&gt; GenLocated SrcSpan RdrName)
-&gt; [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LHsTyVarBndr flag GhcPs -&gt; GenLocated SrcSpan RdrName
forall flag (p :: Pass).
LHsTyVarBndr flag (GhcPass p) -&gt; Located (IdP (GhcPass p))
</span><a href="GHC.Hs.Type.html#hsLTyVarLocName"><span class="hs-identifier hs-var">hsLTyVarLocName</span></a></span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128949"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span>
</span><span id="line-1882"></span><span>
</span><span id="line-1883"></span><span id="local-6989586621681128943"><span class="annot"><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs_kvs"><span class="hs-identifier hs-type">extract_hs_tv_bndrs_kvs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Hs.Type.html#LHsTyVarBndr"><span class="hs-identifier hs-type">LHsTyVarBndr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681128943"><span class="hs-identifier hs-type">flag</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Extension.html#GhcPs"><span class="hs-identifier hs-type">GhcPs</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span></span><span>
</span><span id="line-1884"></span><span class="hs-comment">-- Returns the free kind variables of any explicitly-kinded binders, returning</span><span>
</span><span id="line-1885"></span><span class="hs-comment">-- variable occurrences in left-to-right order.</span><span>
</span><span id="line-1886"></span><span class="hs-comment">-- See Note [Ordering of implicit variables].</span><span>
</span><span id="line-1887"></span><span class="hs-comment">-- NB: Does /not/ delete the binders themselves.</span><span>
</span><span id="line-1888"></span><span class="hs-comment">--     E.g. given  [k1, a:k1, b:k2]</span><span>
</span><span id="line-1889"></span><span class="hs-comment">--          the function returns [k1,k2], even though k1 is bound here</span><span>
</span><span id="line-1890"></span><span id="extract_hs_tv_bndrs_kvs"><span class="annot"><span class="annottext">extract_hs_tv_bndrs_kvs :: forall flag. [LHsTyVarBndr flag GhcPs] -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_hs_tv_bndrs_kvs"><span class="hs-identifier hs-var hs-var">extract_hs_tv_bndrs_kvs</span></a></span></span><span> </span><span id="local-6989586621681128941"><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128941"><span class="hs-identifier hs-var">tv_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1891"></span><span>    </span><span class="annot"><span class="annottext">(LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars)
-&gt; FreeKiTyVars -&gt; HsContext GhcPs -&gt; FreeKiTyVars
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">LHsType GhcPs -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_lty"><span class="hs-identifier hs-var">extract_lty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1892"></span><span>          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128940"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#L"><span class="hs-identifier hs-type">L</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Hs.Type.html#KindedTyVar"><span class="hs-identifier hs-type">KindedTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">XKindedTyVar GhcPs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">flag
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan (IdP GhcPs)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681128940"><span class="annot"><span class="annottext">LHsType GhcPs
</span><a href="#local-6989586621681128940"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LHsTyVarBndr flag GhcPs]
</span><a href="#local-6989586621681128941"><span class="hs-identifier hs-var">tv_bndrs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1893"></span><span>
</span><span id="line-1894"></span><span class="annot"><a href="GHC.Rename.HsType.html#extract_tv"><span class="hs-identifier hs-type">extract_tv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#RdrName"><span class="hs-identifier hs-type">RdrName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1895"></span><span id="extract_tv"><span class="annot"><span class="annottext">extract_tv :: GenLocated SrcSpan RdrName -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#extract_tv"><span class="hs-identifier hs-var hs-var">extract_tv</span></a></span></span><span> </span><span id="local-6989586621681128939"><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681128939"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621681128938"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128938"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1896"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">RdrName -&gt; Bool
</span><a href="GHC.Types.Name.Reader.html#isRdrTyVar"><span class="hs-identifier hs-var">isRdrTyVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; RdrName
forall l e. GenLocated l e -&gt; e
</span><a href="GHC.Types.SrcLoc.html#unLoc"><span class="hs-identifier hs-var">unLoc</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681128939"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681128939"><span class="hs-identifier hs-var">tv</span></a></span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128938"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128938"><span class="hs-identifier hs-var">acc</span></a></span><span>
</span><span id="line-1897"></span><span>
</span><span id="line-1898"></span><span class="hs-comment">-- Deletes duplicates in a list of Located things. This is used to:</span><span>
</span><span id="line-1899"></span><span class="hs-comment">--</span><span>
</span><span id="line-1900"></span><span class="hs-comment">-- * Delete duplicate occurrences of implicitly bound type/kind variables when</span><span>
</span><span id="line-1901"></span><span class="hs-comment">--   bringing them into scope (in rnImplicitBndrs).</span><span>
</span><span id="line-1902"></span><span class="hs-comment">--</span><span>
</span><span id="line-1903"></span><span class="hs-comment">-- * Delete duplicate occurrences of named wildcards (in rn_hs_sig_wc_type and</span><span>
</span><span id="line-1904"></span><span class="hs-comment">--   rnHsWcType).</span><span>
</span><span id="line-1905"></span><span class="hs-comment">--</span><span>
</span><span id="line-1906"></span><span class="hs-comment">-- Importantly, this function is stable with respect to the original ordering</span><span>
</span><span id="line-1907"></span><span class="hs-comment">-- of things in the list. This is important, as it is a property that GHC</span><span>
</span><span id="line-1908"></span><span class="hs-comment">-- relies on to maintain the left-to-right ordering of implicitly quantified</span><span>
</span><span id="line-1909"></span><span class="hs-comment">-- type variables.</span><span>
</span><span id="line-1910"></span><span class="hs-comment">-- See Note [Ordering of implicit variables].</span><span>
</span><span id="line-1911"></span><span id="local-6989586621681130662"><span class="annot"><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier hs-type">nubL</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621681130662"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681130662"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-1912"></span><span id="nubL"><span class="annot"><span class="annottext">nubL :: forall a. Eq a =&gt; [Located a] -&gt; [Located a]
</span><a href="GHC.Rename.HsType.html#nubL"><span class="hs-identifier hs-var hs-var">nubL</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan a -&gt; GenLocated SrcSpan a -&gt; Bool)
-&gt; [GenLocated SrcSpan a] -&gt; [GenLocated SrcSpan a]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nubBy"><span class="hs-identifier hs-var">nubBy</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan a -&gt; GenLocated SrcSpan a -&gt; Bool
forall a l. Eq a =&gt; GenLocated l a -&gt; GenLocated l a -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#eqLocated"><span class="hs-identifier hs-var">eqLocated</span></a></span><span>
</span><span id="line-1913"></span><span>
</span><span id="line-1914"></span><span class="hs-comment">-- | Filter out any potential implicit binders that are either</span><span>
</span><span id="line-1915"></span><span class="hs-comment">-- already in scope, or are explicitly bound in the binder.</span><span>
</span><span id="line-1916"></span><span class="annot"><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-type">filterFreeVarsToBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1917"></span><span>                     </span><span class="hs-comment">-- ^ Explicitly bound here</span><span>
</span><span id="line-1918"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1919"></span><span>                     </span><span class="hs-comment">-- ^ Potential implicit binders</span><span>
</span><span id="line-1920"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Rename.HsType.html#FreeKiTyVars"><span class="hs-identifier hs-type">FreeKiTyVars</span></a></span><span>
</span><span id="line-1921"></span><span>                     </span><span class="hs-comment">-- ^ Final implicit binders</span><span>
</span><span id="line-1922"></span><span id="filterFreeVarsToBind"><span class="annot"><span class="annottext">filterFreeVarsToBind :: FreeKiTyVars -&gt; FreeKiTyVars -&gt; FreeKiTyVars
</span><a href="GHC.Rename.HsType.html#filterFreeVarsToBind"><span class="hs-identifier hs-var hs-var">filterFreeVarsToBind</span></a></span></span><span> </span><span id="local-6989586621681128934"><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128934"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; Bool)
-&gt; FreeKiTyVars -&gt; FreeKiTyVars
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.Utils.Misc.html#filterOut"><span class="hs-identifier hs-var">filterOut</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; Bool
</span><a href="#local-6989586621681128933"><span class="hs-identifier hs-var">is_in_scope</span></a></span><span>
</span><span id="line-1923"></span><span>    </span><span class="hs-comment">-- Make sure to list the binder kvs before the body kvs, as mandated by</span><span>
</span><span id="line-1924"></span><span>    </span><span class="hs-comment">-- Note [Ordering of implicit variables]</span><span>
</span><span id="line-1925"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1926"></span><span>    </span><span id="local-6989586621681128933"><span class="annot"><span class="annottext">is_in_scope :: GenLocated SrcSpan RdrName -&gt; Bool
</span><a href="#local-6989586621681128933"><span class="hs-identifier hs-var hs-var">is_in_scope</span></a></span></span><span> </span><span id="local-6989586621681128932"><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681128932"><span class="hs-identifier hs-var">locc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(GenLocated SrcSpan RdrName -&gt; Bool) -&gt; FreeKiTyVars -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName -&gt; GenLocated SrcSpan RdrName -&gt; Bool
forall a l. Eq a =&gt; GenLocated l a -&gt; GenLocated l a -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#eqLocated"><span class="hs-identifier hs-var">eqLocated</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan RdrName
</span><a href="#local-6989586621681128932"><span class="hs-identifier hs-var">locc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FreeKiTyVars
</span><a href="#local-6989586621681128934"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-1927"></span></pre></body></html>